mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-25 21:41:03 +00:00
scroll if item selected by menu shortcut is out of screen
This commit is contained in:
parent
38fcfa5ba9
commit
5cced2721a
1 changed files with 5 additions and 0 deletions
|
@ -218,6 +218,11 @@ class OptionMenu : Menu
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (mDesc.mSelectedItem <= mDesc.mScrollTop + mDesc.mScrollPos
|
||||
|| mDesc.mSelectedItem >= VisBottom)
|
||||
{
|
||||
mDesc.mScrollPos = MAX(mDesc.mSelectedItem - mDesc.mScrollTop - 1, 0);
|
||||
}
|
||||
}
|
||||
return Super.OnUIEvent(ev);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue