Additional input events added.
This commit is contained in:
@@ -14,6 +14,8 @@ Input_Event :: struct {
|
|||||||
// single frame actions UI and triggers
|
// single frame actions UI and triggers
|
||||||
up_pressed: bool,
|
up_pressed: bool,
|
||||||
down_pressed: bool,
|
down_pressed: bool,
|
||||||
|
left_pressed: bool,
|
||||||
|
right_pressed: bool,
|
||||||
confirm_pressed: bool,
|
confirm_pressed: bool,
|
||||||
pause_pressed: bool,
|
pause_pressed: bool,
|
||||||
}
|
}
|
||||||
@@ -38,6 +40,8 @@ poll_input :: proc() -> Input_Event {
|
|||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
input_event.up_pressed = rl.IsKeyPressed(.W) || rl.IsKeyPressed(.UP)
|
input_event.up_pressed = rl.IsKeyPressed(.W) || rl.IsKeyPressed(.UP)
|
||||||
input_event.down_pressed = rl.IsKeyPressed(.S) || rl.IsKeyPressed(.DOWN)
|
input_event.down_pressed = rl.IsKeyPressed(.S) || rl.IsKeyPressed(.DOWN)
|
||||||
|
input_event.left_pressed = rl.IsKeyPressed(.A) || rl.IsKeyPressed(.LEFT)
|
||||||
|
input_event.right_pressed = rl.IsKeyPressed(.D) || rl.IsKeyPressed(.RIGHT)
|
||||||
input_event.confirm_pressed = rl.IsKeyPressed(.ENTER) || rl.IsKeyPressed(.SPACE)
|
input_event.confirm_pressed = rl.IsKeyPressed(.ENTER) || rl.IsKeyPressed(.SPACE)
|
||||||
input_event.pause_pressed = rl.IsKeyPressed(.P)
|
input_event.pause_pressed = rl.IsKeyPressed(.P)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user