add functionality to move between start button/options button

This commit is contained in:
2025-02-20 06:00:49 +00:00
parent 6d39c17a11
commit 027c8be541
3 changed files with 56 additions and 9 deletions

View File

@@ -9,8 +9,35 @@ struct
val mode =
if #attackHeld input orelse #jumpHeld input then
GameType.LEVEL LevelType.initial
else
else
let
val titleState =
if #downHeld input then
{focus = OPTIONS_BUTTON}
else
titleState
in
GameType.TITLE titleState
end
in
{mode = mode, userKeys = userKeys}
end
| OPTIONS_BUTTON =>
let
val mode =
if #attackHeld input orelse #jumpHeld input then
(* placeholder: go to configure screen instead once that is implemented *)
GameType.TITLE titleState
else
let
val titleState =
if #upHeld input then
{focus = START_BUTTON}
else
titleState
in
GameType.TITLE titleState
end
in
{mode = mode, userKeys = userKeys}
end