aboutsummaryrefslogtreecommitdiffstats
path: root/src/screens/UScreenTop5.pas
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-05-31 14:10:42 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-05-31 14:10:42 +0000
commit257854c587f0876a912cfbeb4fe0a30970d25a9b (patch)
tree43a87074b46eb6211e8c103510f9b2261fe2d08b /src/screens/UScreenTop5.pas
parent1d3a28457fb5ff32d55435e31a5697fd383366d4 (diff)
downloadusdx-257854c587f0876a912cfbeb4fe0a30970d25a9b.tar.gz
usdx-257854c587f0876a912cfbeb4fe0a30970d25a9b.tar.xz
usdx-257854c587f0876a912cfbeb4fe0a30970d25a9b.zip
merged (experimental) mouse support patch by d0ccrazy
some changes to patch - implemented software cursor (texturable) - option to turn of mouse support or switch between hardware and software cursor - hide software cursor if there is no mouse activity for 5 seconds - soft fade in and out for software cursor - some test cursor-textures for deluxe theme (mog pls change these horible looking images) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1789 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/screens/UScreenTop5.pas')
-rw-r--r--src/screens/UScreenTop5.pas10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/screens/UScreenTop5.pas b/src/screens/UScreenTop5.pas
index 23405ebb..39de61c3 100644
--- a/src/screens/UScreenTop5.pas
+++ b/src/screens/UScreenTop5.pas
@@ -57,6 +57,7 @@ type
constructor Create; override;
function ParseInput(PressedKey: cardinal; CharCode: WideChar; PressedDown: boolean): boolean; override;
+ function ParseMouse(MouseButton: Integer; BtnDown: Boolean; X, Y: integer): boolean; override;
procedure onShow; override;
function Draw: boolean; override;
end;
@@ -103,6 +104,15 @@ begin
end;
end;
+function TScreenTop5.ParseMouse(MouseButton: Integer; BtnDown: Boolean; X, Y: integer): boolean;
+begin
+ Result := True;
+ if (MouseButton = SDL_BUTTON_LEFT) and BtnDown then begin
+ //left-click anywhere sends return
+ ParseInput(SDLK_RETURN, #0, true);
+ end;
+end;
+
constructor TScreenTop5.Create;
var
I: integer;