add non-configurable escape button to input type, to be used as a way to go backwards or exit menu

This commit is contained in:
2025-02-20 13:32:37 +00:00
parent 9feae2bb0f
commit 6762a1b994
7 changed files with 23 additions and 2 deletions

View File

@@ -134,6 +134,7 @@ sig
, down: key_code
, jump: key_code
, attack: key_code
, escape: key_code
}
val keyFromString: string -> key_code option
@@ -275,6 +276,7 @@ struct
, down: key_code
, jump: key_code
, attack: key_code
, escape: key_code
}
fun keyFromString str =

View File

@@ -7,5 +7,6 @@ struct
, downHeld: bool
, attackHeld: bool
, jumpHeld: bool
, escapeHeld: bool
}
end

View File

@@ -206,7 +206,15 @@ struct
, ...
} = player
val {leftHeld, rightHeld, upHeld, downHeld, attackHeld, jumpHeld} = input
val
{ leftHeld
, rightHeld
, upHeld
, downHeld
, attackHeld
, jumpHeld
, escapeHeld
} = input
val xAxis = getXAxis (leftHeld, rightHeld)
val facing = getFacing (facing, xAxis)

View File

@@ -0,0 +1,4 @@
structure OptionsType =
struct
datatype focus =
end