mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-24 18:48:01 +02:00
Wrap-around menu selection
This commit is contained in:
parent
5a60d0e2d5
commit
557b13070c
2 changed files with 13 additions and 5 deletions
|
@ -650,12 +650,16 @@ namespace IDE.ui
|
|||
|
||||
public void SelectDirection(int32 dir)
|
||||
{
|
||||
if (mEntryList.IsEmpty)
|
||||
return;
|
||||
int32 newSelection = mSelectIdx + dir;
|
||||
if ((newSelection >= 0) && (newSelection < mEntryList.Count))
|
||||
{
|
||||
if (mEntryList[newSelection].mShowIdx != -1)
|
||||
Select(newSelection);
|
||||
}
|
||||
if (newSelection < 0)
|
||||
newSelection = (.)mEntryList.Count - 1;
|
||||
else if (newSelection >= mEntryList.Count)
|
||||
newSelection = 0;
|
||||
|
||||
if (mEntryList[newSelection].mShowIdx != -1)
|
||||
Select(newSelection);
|
||||
}
|
||||
|
||||
public override void ScrollPositionChanged()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue