aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-11-17 17:35:07 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-11-17 17:35:07 +0000
commit4a0804396809345423d596b079aed51261b8612f (patch)
tree60a137a4d5ab8a246c2ad6303691f5eb1ab426b4 /src/menu
parentdf0a8e7c62a4006ea7ac66ad7c0745a48a32ef24 (diff)
downloadusdx-4a0804396809345423d596b079aed51261b8612f.tar.gz
usdx-4a0804396809345423d596b079aed51261b8612f.tar.xz
usdx-4a0804396809345423d596b079aed51261b8612f.zip
prevent key input from being sent to the screen that is fading out, send it to the screen that is fading in instead.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1946 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/menu')
-rw-r--r--src/menu/UDisplay.pas13
1 files changed, 13 insertions, 0 deletions
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;