mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 13:41:05 +00:00
This commit is contained in:
commit
2f743c3128
2 changed files with 5 additions and 5 deletions
|
@ -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");
|
||||
|
|
|
@ -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