Quoting from here
The reason code that indicates which user action triggered the action. Used with edit_box, list_box, image_button, and slider tiles.
This variable indicates why the action occurred.
Its value is set for any kind of action, but you need to inspect it only when the action is associated with an edit_box, list_box, image_button, or slider tile.
And thats all...
But I'm actually wondering does anyone analysed this more carefully, so could give an example what is the $reason return
on the tile
and the user's action
, for example like:
- double click on an item from listbox
- multiple selection on items from listbox
- up/increase button from slider
- down/decrease button from slider
- ? ? ?
I just made up the above user actions from my head, that may cause the $reason usage - but certainly this isn't the complete list of user action possibilities.
Currently I did test only with 3 edit_boxes, and by shifting between them with TAB or using the LMB/RMB to access the edit_box tile I get returned a $reason value of 2.
I'm about to try the slider and listbox user action reasons - to see what integers are returned, depending on the actions I do, but first I wanted first to ask you guys here.
Also google did not help much about obtaining more info for that tile attribute.