aboutsummaryrefslogtreecommitdiffstats
path: root/src/screens
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-11-18 14:42:34 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-11-18 14:42:34 +0000
commit9975f56cded5f6251d0110238fd97b7ee7ccae31 (patch)
treecf93bba0e884f629dec6f869700468bf86ada68d /src/screens
parentd36fb79a6e0914a43fe9381c32dfdc4639e9a19e (diff)
downloadusdx-9975f56cded5f6251d0110238fd97b7ee7ccae31.tar.gz
usdx-9975f56cded5f6251d0110238fd97b7ee7ccae31.tar.xz
usdx-9975f56cded5f6251d0110238fd97b7ee7ccae31.zip
some changes on mousesupport
- you can click on the whole area of a button after fading - options on selects can be changed by clicking on the arrows - fix mouse parsing at the screensong extensions git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1950 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/screens')
-rw-r--r--src/screens/UScreenSong.pas35
1 files changed, 24 insertions, 11 deletions
diff --git a/src/screens/UScreenSong.pas b/src/screens/UScreenSong.pas
index ff2ab201..e74ea75d 100644
--- a/src/screens/UScreenSong.pas
+++ b/src/screens/UScreenSong.pas
@@ -755,20 +755,33 @@ function TScreenSong.ParseMouse(MouseButton: integer; BtnDown: boolean; X, Y: in
begin
Result := true;
- if RightMbESC and (MouseButton = SDL_BUTTON_RIGHT) and BtnDown then
- //if RightMbESC is set, send ESC keypress
- Result:=ParseInput(SDLK_ESCAPE, 0, true);
+ if (ScreenSongMenu.Visible) then
+ begin
+ Result := ScreenSongMenu.ParseMouse(MouseButton, BtnDown, X, Y);
+ exit;
+ end
+ else if (ScreenSongJumpTo.Visible) then
+ begin
+ Result := ScreenSongJumpTo.ParseMouse(MouseButton, BtnDown, X, Y);
+ exit;
+ end
+ else // no extension visible
+ begin
+ if RightMbESC and (MouseButton = SDL_BUTTON_RIGHT) and BtnDown then
+ //if RightMbESC is set, send ESC keypress
+ Result:=ParseInput(SDLK_ESCAPE, 0, true);
- //song scrolling with mousewheel
- if (MouseButton = SDL_BUTTON_WHEELDOWN) and BtnDown then
- ParseInput(SDLK_RIGHT, 0, true);
+ //song scrolling with mousewheel
+ if (MouseButton = SDL_BUTTON_WHEELDOWN) and BtnDown then
+ ParseInput(SDLK_RIGHT, 0, true);
- if (MouseButton = SDL_BUTTON_WHEELUP) and BtnDown then
- ParseInput(SDLK_LEFT, 0, true);
+ if (MouseButton = SDL_BUTTON_WHEELUP) and BtnDown then
+ ParseInput(SDLK_LEFT, 0, true);
- //LMB anywhere starts
- if (MouseButton = SDL_BUTTON_LEFT) and BtnDown then
- ParseInput(SDLK_RETURN, 0, true);
+ //LMB anywhere starts
+ if (MouseButton = SDL_BUTTON_LEFT) and BtnDown then
+ ParseInput(SDLK_RETURN, 0, true);
+ end;
end;
constructor TScreenSong.Create;