Jump to content

[SOLVED] GUI_ACTIVATED is missing


photo

Recommended Posts

I have an interface with many buttons, each with callbacks attached to GUI_CLICKED. These callbacks work as expected when the user clicks them, but it would be better to listen for a different event so that the buttons can be activated using the keyboard. I searched the documentation and found GUI_ACTIVATED (https://developer.unigine.com/en/docs/1.0/scripting/library/gui/class.gui). It sounded like it is supposed to do exactly what I wanted, so I replaced GUI_CLICKED with GUI_ACTIVATED in my world script. But when I try to load world, I get interpreter error unknown token 'GUI_ACTIVATED'.

 

I searched Unigine engine source and found where GUI_* callback variables are added (GuiInterpreter.cpp) but GUI_ACTIVATED is not present. Was it removed intentionally? It is still in documentation.

 

I also experimented with GUI_PRESSED event, but it behaves differently than I need -- the callback is fired every tick as long as the mouse button is held and I need it to fire only once.

 

So what happened to GUI_ACTIVATED? Is there another elegant solution?

Link to comment
×
×
  • Create New...