From 4a0804396809345423d596b079aed51261b8612f Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Tue, 17 Nov 2009 17:35:07 +0000 Subject: 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 --- src/menu/UDisplay.pas | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/menu') 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; -- cgit v1.2.3