Jump to content

Several ObjectGui and WidgetSprite callbacks


photo

Recommended Posts

Hello.

 

I have two ObjectGui on the scene. Both of them have WidgetSprite with callbacks: GUI_ENTER, GUI_LEAVE, GUI_PRESSED and GUI_RELEASED.

So the problem: callbacks are firing when they should not.

Sometimes when i click on one sprite, i see click on both sprites. Sometimes i just click somewhere in the world and one of sprites become clicked too. It is clearly seen in attached simple demo. I expect sprites to work like independent buttons with 3 states (normal, mouse over, pressed).
 

sprite_callbacks.rar

Link to comment

Hello, Vadim

There are several known issues related to GUI overlap

In your sample it's better to use GUI_ALIGN_LEFT option for correct behaviour.

gui.addChild(sprite, GUI_ALIGN_LEFT);
Link to comment
×
×
  • Create New...