record and act on selected keys in options (except for save button and cancel button which are not acted upon)

This commit is contained in:
2025-02-21 14:46:54 +00:00
parent 20338996b8
commit b2f58f1c9a
5 changed files with 311 additions and 27 deletions

View File

@@ -51,7 +51,11 @@ struct
case GlfwKeyMap.codeFromKey key of
SOME code =>
let
val () = #newKeys state := code :: !(#newKeys state)
val () =
if action = Input.PRESS then
#newKeys state := code :: !(#newKeys state)
else
()
val {left, right, down, up, attack, jump, escape} = !keyMappings
val action = actionToBool action
in