mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-08 01:05:59 +02:00
Wrap-around menu selection
This commit is contained in:
parent
5a60d0e2d5
commit
557b13070c
2 changed files with 13 additions and 5 deletions
|
@ -528,6 +528,8 @@ namespace Beefy.widgets
|
|||
SetSelection(0);
|
||||
break;
|
||||
}
|
||||
else if ((mSelectIdx == 0) && (!mItemWidgets.IsEmpty))
|
||||
SetSelection(mItemWidgets.Count - 1);
|
||||
else if (mSelectIdx > 0)
|
||||
SetSelection(mSelectIdx - 1);
|
||||
break;
|
||||
|
@ -539,6 +541,8 @@ namespace Beefy.widgets
|
|||
}
|
||||
else if (mSelectIdx < mItemWidgets.Count - 1)
|
||||
SetSelection(mSelectIdx + 1);
|
||||
else
|
||||
SetSelection(0);
|
||||
break;
|
||||
case .Return:
|
||||
SubmitSelection();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue