Hiding Menus

BlitzMax Forums/MaxGUI Module/Hiding Menus

ponyboy(Posted 2008) [#1]
Does HideGadget work on menus? I tried creating a hidden menu and using HideGadget to hide it, but it is still visible. I was going to use it for global keypresses in my MaxGUI app, is there a better way to handle keys being pressed no matter which gadget has focus? I noticed no event is thrown during a KeyDown, KeyUp, or KeyPress. Thanks!


skidracer(Posted 2008) [#2]
Check out SetHotkeyEvent which will fire an Event every time your hotkey is pressed.


ponyboy(Posted 2008) [#3]
Thanks, that will work nicely! Is there a certain event I should use in the SetHotkeyEvent function in order to catch these events? If I omit the event it shows as an Unknown Event.


skidracer(Posted 2008) [#4]
The docs say:

If event is null, an event with id equal to EVENT_HOTKEYHIT, data equal to key and mods equal to mods will be emitted.

so would be surprised if thats not the case.

... there is a problem with CurrentEvent.ToString() not recognizing EVENT_HOTKEYHIT, have commited a fix to subversion.


ponyboy(Posted 2008) [#5]
Ok, that's why I was seeing the Unknown Event then. Thanks!