mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 15:02:39 +00:00
Don't lose the cursor when scrolling up in option menus
- Fixed: If the menu cursor was on the topmost-displayed item, pressing up would not scroll the view up. The check for scrolling only tested if the newly selected item was the topmost one, since the menu code had assumed the only time the cursor would be on the topmost visible line was when it was the very first line of the menu. Using PgDn breaks this assumption.
This commit is contained in:
parent
b69edbbec1
commit
dc6b45804d
1 changed files with 2 additions and 2 deletions
|
@ -196,9 +196,9 @@ bool DOptionMenu::MenuEvent (int mkey, bool fromcontroller)
|
|||
--mDesc->mSelectedItem;
|
||||
|
||||
if (mDesc->mScrollPos > 0 &&
|
||||
mDesc->mSelectedItem == mDesc->mScrollTop + mDesc->mScrollPos)
|
||||
mDesc->mSelectedItem <= mDesc->mScrollTop + mDesc->mScrollPos)
|
||||
{
|
||||
mDesc->mScrollPos--;
|
||||
mDesc->mScrollPos = MAX(mDesc->mSelectedItem - mDesc->mScrollTop - 1, 0);
|
||||
}
|
||||
|
||||
if (mDesc->mSelectedItem < 0)
|
||||
|
|
Loading…
Reference in a new issue