Author Topic: [image].rawset_index_offset explination  (Read 9602 times)

ArcadeBliss

  • Sr. Member
  • ****
  • Posts: 195
    • View Profile
[image].rawset_index_offset explination
« on: August 10, 2016, 08:21:10 PM »
The property rawset_index_offset is not in the documentation. Can anyone explain what it does?

raygun

  • Administrator
  • Sr. Member
  • *****
  • Posts: 393
    • View Profile
Re: [image].rawset_index_offset explination
« Reply #1 on: September 06, 2016, 01:28:28 PM »
When you set the index_offset property of an object in squirrel, the frontend goes off and loads the new image/video at that image offset right away so it is immediately available.

rawset_index_offset() is an optimization/hack that allows scripts to do essentially the same thing (set the index_offset), but without triggering any of this reloading by the frontend that normally happens when the property is set.  This can be useful if the script knows that image loading is about to be triggered anyways (such as during a start navigation transition callback).  I'm pretty sure the only thing using this currently is the conveyor module.

cheers

ArcadeBliss

  • Sr. Member
  • ****
  • Posts: 195
    • View Profile
Re: [image].rawset_index_offset explination
« Reply #2 on: October 14, 2016, 06:51:18 AM »
Thanks for the explanation. I recently altered the conveyor module to allow the creation of a menu based off of a table and the reason for this property was puzzling to me. Do you mid putting the explanation in the layouts.md for others?