Frygui - no more events

BlitzMax Forums/BlitzMax Beginners Area/Frygui - no more events

Volker(Posted 2009) [#1]
Hi,

I create two screens with each a panel and a button.
Then the screen shall switch if the button is clicked.
(no, I can't use setlink()).
After clicking the button the screen is switched but
there are no more events created.
If I switch the screen with space key it works fine.
The error must be somewhere in the lines marked with ***
Help appreciated..




Fry Crayola(Posted 2009) [#2]
Hi Volker,

Apologies for the really late reply, I've not had much chance to be about the forums and I've only just seen this.

When you're testing the event, don't use fry_EVENT_GADGETACTION, use fry_EVENT_GADGETSELECT.

The former is generated when the button is held down, and when the button is held down, it becomes the currently active gadget. When a gadget is active, no other gadgets will generate events.
Unfortunately, if you change the screen whilst a gadget is currently active in this manner, it never manages to release its active gadget status as it's no longer polled for input, and so no more events are generated until you return to that screen.

fry_EVENT_GADGETSELECT is generated when the button is released. Released buttons relinquish their active status, so the problem is never encountered.

Sorry if it's not the clearest, and again, sorry if this all comes a little too late.


Volker(Posted 2009) [#3]
Hey, better late than never. Nice to see that it wasn' t my fault.