mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
Menu: Never treat keys with no "Char" as hotkeys.
This commit is contained in:
parent
4b8f4212ef
commit
8ece6dff6a
2 changed files with 3 additions and 3 deletions
|
@ -106,11 +106,11 @@ class ListMenu : Menu
|
|||
|
||||
override bool OnUIEvent(UIEvent ev)
|
||||
{
|
||||
if (ev.Type == UIEvent.Type_KeyDown)
|
||||
if (ev.Type == UIEvent.Type_KeyDown && ev.KeyChar > 0)
|
||||
{
|
||||
// tolower
|
||||
int ch = ev.KeyChar;
|
||||
ch = ch >= 65 && ch <91? ch + 32 : ch;
|
||||
ch = ch >= 65 && ch < 91 ? ch + 32 : ch;
|
||||
|
||||
for(int i = mDesc.mSelectedItem + 1; i < mDesc.mItems.Size(); i++)
|
||||
{
|
||||
|
|
|
@ -199,7 +199,7 @@ class ListMenuItemSelectable : ListMenuItem
|
|||
|
||||
override bool CheckHotkey(int c)
|
||||
{
|
||||
return c == mHotkey;
|
||||
return c > 0 && c == mHotkey;
|
||||
}
|
||||
|
||||
override bool Activate()
|
||||
|
|
Loading…
Reference in a new issue