summaryrefslogtreecommitdiff
path: root/src/sokoban.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/sokoban.adb')
-rw-r--r--src/sokoban.adb22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/sokoban.adb b/src/sokoban.adb
index de5601d..80a2972 100644
--- a/src/sokoban.adb
+++ b/src/sokoban.adb
@@ -54,10 +54,10 @@ package body Sokoban is
Fully_Complete_Message : String := "Congratulations! All levels complete!" & ASCII.LF &
"Press enter to start again at the first level, or q to quit.";
- U_Key : FLTK.Shortcut_Key := FLTK.Shortcut ('u');
- N_Key : FLTK.Shortcut_Key := FLTK.Shortcut ('n');
- R_Key : FLTK.Shortcut_Key := FLTK.Shortcut ('r');
- Q_Key : FLTK.Shortcut_Key := FLTK.Shortcut ('q');
+ U_Key : FLTK.Key_Combo := FLTK.Press ('u');
+ N_Key : FLTK.Key_Combo := FLTK.Press ('n');
+ R_Key : FLTK.Key_Combo := FLTK.Press ('r');
+ Q_Key : FLTK.Key_Combo := FLTK.Press ('q');
@@ -149,10 +149,10 @@ package body Sokoban is
-- Keyboard and mouse control handling.
function Keypress
- (Key : in FLTK.Shortcut_Key)
+ (Key : in FLTK.Key_Combo)
return FLTK.Event_Outcome
is
- use type FLTK.Shortcut_Key;
+ use type FLTK.Key_Combo;
begin
if Key = Q_Key then
Hide;
@@ -160,13 +160,13 @@ package body Sokoban is
end if;
if Level_State = Play then
- if Key = FLTK.Up_Key then
+ if Key = FLTK.Press (FLTK.Up_Key) then
Move_Man (0, -1);
- elsif Key = FLTK.Down_Key then
+ elsif Key = FLTK.Press (FLTK.Down_Key) then
Move_Man (0, 1);
- elsif Key = FLTK.Left_Key then
+ elsif Key = FLTK.Press (FLTK.Left_Key) then
Move_Man (-1, 0);
- elsif Key = FLTK.Right_Key then
+ elsif Key = FLTK.Press (FLTK.Right_Key) then
Move_Man (1, 0);
elsif Key = U_Key then
if Move_Record.Length > 0 then
@@ -185,7 +185,7 @@ package body Sokoban is
return FLTK.Not_Handled;
end if;
return FLTK.Handled;
- elsif Level_State = Complete and Key = FLTK.Enter_Key then
+ elsif Level_State = Complete and Key = FLTK.Press (FLTK.Enter_Key) then
if Current_Level = LevelID'Last then
Load_Level (LevelID'First);
else