1
1
forked from 0ad/0ad

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:
wraitii 2021-05-25 06:10:53 +00:00
parent 8742fac032
commit b56f0222d9

View File

@ -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)