From 98a73d899eb17d439c7cfe20c26fe4bae8dd1c25 Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Sun, 10 Nov 2024 07:41:54 -0500 Subject: [PATCH] make settings menu wrap --- components/settings/settings.bs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/components/settings/settings.bs b/components/settings/settings.bs index 55239d77..200cf2bf 100644 --- a/components/settings/settings.bs +++ b/components/settings/settings.bs @@ -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