diff options
author | Adam Zadrożny <zadroznyadam@pm.me> | 2024-03-25 13:31:26 +0100 |
---|---|---|
committer | Adam Zadrożny <zadroznyadam@pm.me> | 2024-03-25 13:31:26 +0100 |
commit | 34f8acab833b9c2969e28109a29daa7dd0c162c4 (patch) | |
tree | 4b0fd58ffde3a18d107f3a0813e34ad329e0affa | |
parent | 602691ae92c8abafd77342a1bb65d5de5c27a765 (diff) |
add support for running with right shift pressed
I personally find it much more convenient to use
my other hand to hold the shift to run.
The behaviour of left shift is left unchanged.
-rw-r--r-- | eepers.adb | 4 | ||||
-rw-r--r-- | raylib.ads | 1 |
2 files changed, 3 insertions, 2 deletions
@@ -1458,7 +1458,7 @@ begin if Game.Player.Dead then Command_Queue.Size := 0; else - if Boolean(Is_Key_Down(KEY_LEFT_SHIFT)) and then Game.Turn_Animation <= 0.0 then + if (Boolean(Is_Key_Down(KEY_LEFT_SHIFT)) or else Boolean(Is_Key_Down(KEY_RIGHT_SHIFT))) and then Game.Turn_Animation <= 0.0 then if Is_Key_Down(KEY_A) or else Is_Key_Down(KEY_LEFT) then Command_Queue.Size := 0; Command_Enqueue(Command_Queue, (Kind => Command_Step, Dir => Left)); @@ -1493,7 +1493,7 @@ begin Command_Enqueue(Command_Queue, (Kind => Command_Plant)); end if; end if; - if Is_Key_Down(KEY_LEFT_SHIFT) then + if Boolean(Is_Key_Down(KEY_LEFT_SHIFT)) or else Boolean(Is_Key_Down(KEY_RIGHT_SHIFT)) then TURN_DURATION_SECS := BASE_TURN_DURATION_SECS * 0.8; else if Command_Queue.Size /= 0 then @@ -79,6 +79,7 @@ package Raylib is KEY_ESCAPE: constant int := 256; KEY_ENTER: constant Int := 257; KEY_LEFT_SHIFT: constant Int := 340; + KEY_RIGHT_SHIFT: constant Int := 344; function Is_Key_Pressed(key: int) return C_bool with |