Jump to content

[SOLVED] More detailed callbacks, pre-event / post-event


photo

Recommended Posts

Posted

I have attached example showing minor limitation of GUI_FOCUS_OUT callback. 

 

1) Change text in editline on Tab 0

2) Click on empty space to remove focus from editline.

3) Label is updated showing that active tab when firing callback is still Tab 0.

This works as expected.

 

1) Change text in editline on Tab 0.

2) Switch focus away from editline by clicking on Tab 1.

3) Label is updated, showing that active tab when firing callback is Tab 1.

 

In my case, I need callback that fires BEFORE focus has actually changed and active tab has switched. This could be solved with a new callback, something like GUI_FOCUS_OUT_PRE.

 

There are other approaches to solve my problem and this is a rare corner case. It is not strictly necessary but would be convenient.

test.zip

Posted

Hm, I see now that all GUI callbacks have delayed processing and are not executed instantaneously. My above request may not be feasible...

Posted

Hi Adam,

 

All GUI callbacks will be executed after script update function so yes, it'll be one frame lag between callback and next script update.

×
×
  • Create New...