aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/base/UMain.pas2
-rw-r--r--src/menu/UDisplay.pas13
2 files changed, 14 insertions, 1 deletions
diff --git a/src/base/UMain.pas b/src/base/UMain.pas
index b8ddf346..439b0faa 100644
--- a/src/base/UMain.pas
+++ b/src/base/UMain.pas
@@ -514,7 +514,7 @@ begin
else
begin
// check if screen wants to exit
- Done := not Display.CurrentScreen^.ParseInput(Event.key.keysym.sym, Event.key.keysym.unicode, true);
+ Done := not Display.ParseInput(Event.key.keysym.sym, Event.key.keysym.unicode, true);
// if screen wants to exit
if Done then
diff --git a/src/menu/UDisplay.pas b/src/menu/UDisplay.pas
index 6f29d2e1..81056c13 100644
--- a/src/menu/UDisplay.pas
+++ b/src/menu/UDisplay.pas
@@ -91,6 +91,9 @@ type
function Draw: boolean;
+ { calls ParseInput of cur or next Screen if assigned }
+ function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown : boolean): boolean;
+
{ sets SDL_ShowCursor depending on options set in Ini }
procedure SetCursor;
@@ -505,6 +508,16 @@ begin
end;
end;
+function TDisplay.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown : boolean): boolean;
+begin
+ if (assigned(NextScreen)) then
+ Result := NextScreen^.ParseInput(PressedKey, CharCode, PressedDown)
+ else if (assigned(CurrentScreen)) then
+ Result := CurrentScreen^.ParseInput(PressedKey, CharCode, PressedDown)
+ else
+ Result := True;
+end;
+
procedure TDisplay.SaveScreenShot;
var
Num: integer;