mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-31 05:40:44 +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)
|
override bool OnUIEvent(UIEvent ev)
|
||||||
{
|
{
|
||||||
if (ev.Type == UIEvent.Type_KeyDown)
|
if (ev.Type == UIEvent.Type_KeyDown && ev.KeyChar > 0)
|
||||||
{
|
{
|
||||||
// tolower
|
// tolower
|
||||||
int ch = ev.KeyChar;
|
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++)
|
for(int i = mDesc.mSelectedItem + 1; i < mDesc.mItems.Size(); i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -199,7 +199,7 @@ class ListMenuItemSelectable : ListMenuItem
|
||||||
|
|
||||||
override bool CheckHotkey(int c)
|
override bool CheckHotkey(int c)
|
||||||
{
|
{
|
||||||
return c == mHotkey;
|
return c > 0 && c == mHotkey;
|
||||||
}
|
}
|
||||||
|
|
||||||
override bool Activate()
|
override bool Activate()
|
||||||
|
|
Loading…
Reference in a new issue