mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-13 22:16:30 +00:00
Adds Skip method to SGUIMessage which works more or less like wxEvent.Skip: GUI objects can allow other event handlers to process an input event after they finish.
Allows hotkey handling of mousewheel events after minimap. Fixes #673. Adds SendEvent to GUI objects, used in place of separate calls to HandleMessage and ScriptEvent. This was SVN commit r9340.
This commit is contained in:
@@ -34,7 +34,7 @@ IGUIButtonBehavior::~IGUIButtonBehavior()
|
||||
{
|
||||
}
|
||||
|
||||
void IGUIButtonBehavior::HandleMessage(const SGUIMessage &Message)
|
||||
void IGUIButtonBehavior::HandleMessage(SGUIMessage &Message)
|
||||
{
|
||||
// TODO Gee: easier access functions
|
||||
switch (Message.type)
|
||||
@@ -63,8 +63,7 @@ void IGUIButtonBehavior::HandleMessage(const SGUIMessage &Message)
|
||||
{
|
||||
m_Pressed = false;
|
||||
// BUTTON WAS CLICKED
|
||||
HandleMessage(GUIM_PRESSED);
|
||||
ScriptEvent("press");
|
||||
SendEvent(GUIM_PRESSED, "press");
|
||||
}
|
||||
} break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user