diff --git a/wadsrc/static/zscript/menu/listmenu.txt b/wadsrc/static/zscript/menu/listmenu.txt index b1fbcd105..37d00f6e0 100644 --- a/wadsrc/static/zscript/menu/listmenu.txt +++ b/wadsrc/static/zscript/menu/listmenu.txt @@ -106,15 +106,15 @@ 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++) { - if (mDesc.mItems[i].CheckHotkey(ch)) + if (mDesc.mitems[i].Selectable() && mDesc.mItems[i].CheckHotkey(ch)) { mDesc.mSelectedItem = i; MenuSound("menu/cursor"); @@ -123,7 +123,7 @@ class ListMenu : Menu } for(int i = 0; i < mDesc.mSelectedItem; i++) { - if (mDesc.mItems[i].CheckHotkey(ch)) + if (mDesc.mitems[i].Selectable() && mDesc.mItems[i].CheckHotkey(ch)) { mDesc.mSelectedItem = i; MenuSound("menu/cursor"); diff --git a/wadsrc/static/zscript/menu/listmenuitems.txt b/wadsrc/static/zscript/menu/listmenuitems.txt index 5b4a4e549..59bff9f61 100644 --- a/wadsrc/static/zscript/menu/listmenuitems.txt +++ b/wadsrc/static/zscript/menu/listmenuitems.txt @@ -199,7 +199,7 @@ class ListMenuItemSelectable : ListMenuItem override bool CheckHotkey(int c) { - return c == mHotkey; + return c > 0 && c == mHotkey; } override bool Activate()