Some questions about the menu class
Moderator: Forum Moderators
Some questions about the menu class
I have a couple of questions about the menu-class in wesnoth.
1. When creating a dialog (or any other gui-element) with more than one menu, they all recieve the same key-events. E.g. down-arrow will change the selection for all menus. Is this a bug or am I just using them wrong?
2. Is there a way to hide a menu (and not make it handle any events)? It would be nice not having to destroy the menu each time it should disappear from the gui.l
1. When creating a dialog (or any other gui-element) with more than one menu, they all recieve the same key-events. E.g. down-arrow will change the selection for all menus. Is this a bug or am I just using them wrong?
2. Is there a way to hide a menu (and not make it handle any events)? It would be nice not having to destroy the menu each time it should disappear from the gui.l
Thanks for the answers Just some additional questions about this:
(2) So if I want to hide a menu, I can just paint it over with something else and skip calling process() for this menu object?
What will happen when calling pump()? Wont the "hidden" menu stil recieve and handle the events and e.g. change which item is selected?
(2) So if I want to hide a menu, I can just paint it over with something else and skip calling process() for this menu object?
What will happen when calling pump()? Wont the "hidden" menu stil recieve and handle the events and e.g. change which item is selected?