add function to convert string to CoreKey.key_code (for parsing/loading controls from files)
This commit is contained in:
@@ -30,7 +30,9 @@ struct
|
||||
, jumpHeld = !(#jumpHeld state)
|
||||
}
|
||||
|
||||
fun actionToBool action = action = Input.PRESS
|
||||
(* there are three action states reported by OS: PRESS, REPEAT and RELEASE.
|
||||
* If input is PRESS or REPEAT, then return true, or else return false. *)
|
||||
fun actionToBool action = action <> Input.RELEASE
|
||||
|
||||
fun handleKey (key, action) =
|
||||
case GlfwKeyMap.codeFromKey key of
|
||||
|
||||
1
shell/parse-controls.sml
Normal file
1
shell/parse-controls.sml
Normal file
@@ -0,0 +1 @@
|
||||
structure ParseControls = struct end
|
||||
Reference in New Issue
Block a user