Prevent hotkeys from firing for disabled buttons
Reported by: Angen Accepted By: Angen Refs #6042 Differential Revision: https://code.wildfiregames.com/D4013 This was SVN commit r25545.
This commit is contained in:
parent
8742fac032
commit
b56f0222d9
@ -141,6 +141,8 @@ InReaction CGUI::HandleEvent(const SDL_Event_* ev)
|
||||
if (it != m_HotkeyObjects.end())
|
||||
for (IGUIObject* const& obj : it->second)
|
||||
{
|
||||
if (!obj->IsEnabled())
|
||||
continue;
|
||||
if (ev->ev.type == SDL_HOTKEYPRESS)
|
||||
ret = obj->SendEvent(GUIM_PRESSED, EventNamePress);
|
||||
else if (ev->ev.type == SDL_HOTKEYDOWN)
|
||||
|
Loading…
Reference in New Issue
Block a user