0ad/source/gui/Scripting
wraitii 4b46c09222 Do not trigger "HotkeyPress" events when releasing a key.
Follows d0a42f2f00.
Because only the most specific hotkeys can be active at any time,
releasing a key may require re-activating less specific hotkeys.
There were two issues with this behaviour:
- It was buggy, as it only checked one active key, when any still active
key can trigger hotkeys.
- "HotkeyPress" and "HotkeyDown" events where sent, as if the hotkey was
pressed, which was unexpected for most code/users (it is unusual to have
a "Press" event on key release).

This fixes these issues by "silently" re-triggering the hotkeys in such
a case. It also makes it easier for JS code to use "hotkeyPress" instead
of "hotkeyDown" for non-continuous behaviour.

Accepted By: nani
Fixes #6123
Refs #6064 (fixes the problem, but not the code weirdness)

Differential Revision: https://code.wildfiregames.com/D3766
This was SVN commit r25169.
2021-03-31 15:50:25 +00:00
..
GuiScriptConversions.cpp Do not trigger "HotkeyPress" events when releasing a key. 2021-03-31 15:50:25 +00:00
JSInterface_CButton.cpp Reduce duplication in JSI GUI objects implementation. 2020-12-13 15:06:18 +00:00
JSInterface_CList.cpp Reduce duplication in JSI GUI objects implementation. 2020-12-13 15:06:18 +00:00
JSInterface_CText.cpp Reduce duplication in JSI GUI objects implementation. 2020-12-13 15:06:18 +00:00
JSInterface_GUIManager.cpp Refactor all usage of RegisterFunction to ScriptFunction::Register 2021-03-02 20:01:14 +00:00
JSInterface_GUIManager.h Refactor all usage of RegisterFunction to ScriptFunction::Register 2021-03-02 20:01:14 +00:00
JSInterface_GUIProxy.h Reduce duplication in JSI GUI objects implementation. 2020-12-13 15:06:18 +00:00
JSInterface_GUIProxy_impl.h Reduce duplication in JSI GUI objects implementation. 2020-12-13 15:06:18 +00:00
JSInterface_GUISize.cpp [SM60 2/2] Update to Spidermonkey 60 APIs 2020-11-24 15:47:03 +00:00
JSInterface_GUISize.h [SM52 2/2] Update to Spidermonkey 52 APIs. 2020-11-18 14:39:04 +00:00
JSInterface_IGUIObject.cpp Reduce duplication in JSI GUI objects implementation. 2020-12-13 15:06:18 +00:00
ScriptFunctions.cpp Refactor all usage of RegisterFunction to ScriptFunction::Register 2021-03-02 20:01:14 +00:00
ScriptFunctions.h Sort GUI Object types, GUI Object bases and GUI Setting value types into three new folders. 2019-10-02 09:44:00 +00:00