Skip to content

Commit

Permalink
make settings menu wrap
Browse files Browse the repository at this point in the history
  • Loading branch information
cewert committed Nov 10, 2024
1 parent 51a6a33 commit 98a73d8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions components/settings/settings.bs
Original file line number Diff line number Diff line change
Expand Up @@ -251,5 +251,19 @@ function onKeyEvent(key as string, press as boolean) as boolean
settingSelected()
end if

if key = "up" and m.settingsMenu.focusedChild <> invalid and m.settingsMenu.itemFocused = 0
m.settingsMenu.jumpToItem = m.settingsMenu.content.getChildCount() - 1

return true
end if

if key = "down" and m.settingsMenu.focusedChild <> invalid
if m.settingsMenu.itemFocused = m.settingsMenu.content.getChildCount() - 1
m.settingsMenu.jumpToItem = 0

return true
end if
end if

return false
end function

0 comments on commit 98a73d8

Please sign in to comment.