aboutsummaryrefslogtreecommitdiffstats
path: root/us_maker_edition/src/base
diff options
context:
space:
mode:
Diffstat (limited to 'us_maker_edition/src/base')
-rw-r--r--us_maker_edition/src/base/UMain.pas20
-rw-r--r--us_maker_edition/src/base/UThemes.pas5
2 files changed, 18 insertions, 7 deletions
diff --git a/us_maker_edition/src/base/UMain.pas b/us_maker_edition/src/base/UMain.pas
index 174ef162..c1e45c03 100644
--- a/us_maker_edition/src/base/UMain.pas
+++ b/us_maker_edition/src/base/UMain.pas
@@ -36,6 +36,8 @@ interface
uses
SysUtils,
SDL;
+var
+ CheckMouseButton: boolean; // for checking mouse motion
procedure Main;
procedure MainLoop;
@@ -425,16 +427,12 @@ begin
if (Ini.Mouse > 0) then
begin
case Event.type_ of
- SDL_MOUSEMOTION:
- begin
- mouseDown := false;
- mouseBtn := 0;
- end;
+
SDL_MOUSEBUTTONDOWN:
begin
mouseDown := true;
mouseBtn := Event.button.button;
-
+ CheckMouseButton := true;
if (mouseBtn = SDL_BUTTON_LEFT) or (mouseBtn = SDL_BUTTON_RIGHT) then
Display.OnMouseButton(true);
end;
@@ -442,10 +440,18 @@ begin
begin
mouseDown := false;
mouseBtn := Event.button.button;
-
+ CheckMouseButton := false;
if (mouseBtn = SDL_BUTTON_LEFT) or (mouseBtn = SDL_BUTTON_RIGHT) then
Display.OnMouseButton(false);
end;
+ SDL_MOUSEMOTION:
+ begin
+ if (CheckMouseButton) then
+ mouseDown := true
+ else
+ mouseDown := false;
+ mouseBtn := 0;
+ end;
end;
Display.MoveCursor(Event.button.X * 800 * Screens / ScreenW,
diff --git a/us_maker_edition/src/base/UThemes.pas b/us_maker_edition/src/base/UThemes.pas
index de569b97..49340038 100644
--- a/us_maker_edition/src/base/UThemes.pas
+++ b/us_maker_edition/src/base/UThemes.pas
@@ -508,6 +508,8 @@ type
TThemeEditSub = class(TThemeBasic)
//in editor - headers
BackgroundImage: TThemeStatic;
+ ButtonCurrentLine: TThemeButton;
+ ButtonCurrentNote: TThemeButton;
SlideTitle: TThemeSelectSlide;
SlideArtist: TThemeSelectSlide;
SlideMP3: TThemeSelectSlide;
@@ -1407,6 +1409,9 @@ begin
// editor
ThemeLoadBasic (EditSub, 'EditSub');
ThemeLoadStatic(EditSub.BackgroundImage, 'EditSubBackgroundImage');
+ // current position in editor
+ ThemeLoadButton(EditSub.ButtonCurrentLine, 'EditSubButtonCurrentLine');
+ ThemeLoadButton(EditSub.ButtonCurrentNote, 'EditSubButtonCurrentNote');
ThemeLoadSelectSlide(EditSub.SlideTitle, 'EditSubTitle');
ThemeLoadSelectSlide(EditSub.SlideArtist, 'EditSubArtist');
ThemeLoadSelectSlide(EditSub.SlideMP3, 'EditSubMP3');