aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/src/screens
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/src/screens')
-rw-r--r--cmake/src/screens/UScreenEditConvert.pas43
-rw-r--r--cmake/src/screens/UScreenMain.pas34
-rw-r--r--cmake/src/screens/UScreenOptionsAdvanced.pas31
-rw-r--r--cmake/src/screens/UScreenOptionsGame.pas50
-rw-r--r--cmake/src/screens/UScreenOptionsGraphics.pas25
-rw-r--r--cmake/src/screens/UScreenOptionsLyrics.pas15
-rw-r--r--cmake/src/screens/UScreenOptionsRecord.pas5
-rw-r--r--cmake/src/screens/UScreenOptionsSound.pas42
-rw-r--r--cmake/src/screens/UScreenOptionsThemes.pas8
-rw-r--r--cmake/src/screens/UScreenScore.pas10
-rw-r--r--cmake/src/screens/UScreenSing.pas14
-rw-r--r--cmake/src/screens/UScreenSong.pas140
-rw-r--r--cmake/src/screens/UScreenTop5.pas35
13 files changed, 295 insertions, 157 deletions
diff --git a/cmake/src/screens/UScreenEditConvert.pas b/cmake/src/screens/UScreenEditConvert.pas
index 361a3be7..e4a691cf 100644
--- a/cmake/src/screens/UScreenEditConvert.pas
+++ b/cmake/src/screens/UScreenEditConvert.pas
@@ -34,6 +34,7 @@ interface
{$I switches.inc}
uses
+ math,
UMenu,
SDL,
{$IFDEF UseMIDIPort}
@@ -575,7 +576,7 @@ var
Bottom: real;
X: real;
Y: real;
- H: real;
+ Height: real;
YSkip: real;
begin
// draw static menu
@@ -583,20 +584,24 @@ begin
Y := 100;
- H := Length(ATrack)*40;
- if H > 480 then
- H := 480;
- Bottom := Y + H;
+ Height := min(480, 40 * Length(ATrack));
+ Bottom := Y + Height;
- YSkip := H / Length(ATrack);
+ if Length(ATrack) = 0 then // prevent crash with uncomplete code.
+ begin
+ Log.LogDebug ('UScreenEditConvert -> TScreenEditConvert.Draw:', 'Length(ATrack) = 0');
+ YSkip := 40;
+ end
+ else
+ YSkip := Height / Length(ATrack);
// select
- DrawQuad(10, Y+Sel*YSkip, 780, YSkip, 0.8, 0.8, 0.8);
+ DrawQuad(10, Y + Sel*YSkip, 780, YSkip, 0.8, 0.8, 0.8);
// selected - now me use Status System
for Count := 0 to High(ATrack) do
if ATrack[Count].Hear then
- DrawQuad(10, Y+Count*YSkip, 50, YSkip, 0.8, 0.3, 0.3);
+ DrawQuad(10, Y + Count*YSkip, 50, YSkip, 0.8, 0.3, 0.3);
glColor3f(0, 0, 0);
for Count := 0 to High(ATrack) do
begin
@@ -614,12 +619,12 @@ begin
end;
end;
- DrawLine(10, Y, 10, Bottom, 0, 0, 0);
- DrawLine(60, Y, 60, Bottom, 0, 0, 0);
+ DrawLine( 10, Y, 10, Bottom, 0, 0, 0);
+ DrawLine( 60, Y, 60, Bottom, 0, 0, 0);
DrawLine(790, Y, 790, Bottom, 0, 0, 0);
for Count := 0 to Length(ATrack) do
- DrawLine(10, Y+Count*YSkip, 790, Y+Count*YSkip, 0, 0, 0);
+ DrawLine(10, Y + Count*YSkip, 790, Y + Count*YSkip, 0, 0, 0);
for Count := 0 to High(ATrack) do
begin
@@ -632,9 +637,21 @@ begin
for Count2 := 0 to High(ATrack[Count].Note) do
begin
if ATrack[Count].Note[Count2].EventType = 9 then
- DrawQuad(60 + ATrack[Count].Note[Count2].Start/Len * 725, Y + (Count+1)*YSkip - ATrack[Count].Note[Count2].Data1*35/127, 3, 3, ColR[Count], ColG[Count], ColB[Count]);
+ DrawQuad(60 + ATrack[Count].Note[Count2].Start/Len*725,
+ Y + (Count+1)*YSkip - ATrack[Count].Note[Count2].Data1*35/127,
+ 3,
+ 3,
+ ColR[Count],
+ ColG[Count],
+ ColB[Count]);
if ATrack[Count].Note[Count2].EventType = 15 then
- DrawLine(60 + ATrack[Count].Note[Count2].Start/Len * 725, Y + 0.75 * YSkip + Count*YSkip, 60 + ATrack[Count].Note[Count2].Start/Len * 725, Y + YSkip + Count*YSkip, ColR[Count], ColG[Count], ColB[Count]);
+ DrawLine(60 + ATrack[Count].Note[Count2].Start/Len*725,
+ Y + 0.75*YSkip + Count*YSkip,
+ 60 + ATrack[Count].Note[Count2].Start/Len*725,
+ Y + YSkip + Count*YSkip,
+ ColR[Count],
+ ColG[Count],
+ ColB[Count]);
end;
// playing line
diff --git a/cmake/src/screens/UScreenMain.pas b/cmake/src/screens/UScreenMain.pas
index 36cf84b0..a4e6009f 100644
--- a/cmake/src/screens/UScreenMain.pas
+++ b/cmake/src/screens/UScreenMain.pas
@@ -52,10 +52,7 @@ type
function ParseInput(PressedKey: cardinal; CharCode: widechar;
PressedDown: boolean): boolean; override;
procedure onShow; override;
- procedure InteractNext; override;
- procedure InteractPrev; override;
- procedure InteractInc; override;
- procedure InteractDec; override;
+ procedure SetInteraction(Num: integer); override;
procedure SetAnimationProgress(Progress: real); override;
end;
@@ -238,36 +235,19 @@ end;
procedure TScreenMain.onShow;
begin
inherited;
+
+ { display cursor (on moved) }
+ Display.SetCursor;
+
{**
* Start background music
*}
SoundLib.StartBgMusic;
end;
-procedure TScreenMain.InteractNext;
-begin
- inherited InteractNext;
- Text[TextDescription].Text := Theme.Main.Description[Interaction];
- Text[TextDescriptionLong].Text := Theme.Main.DescriptionLong[Interaction];
-end;
-
-procedure TScreenMain.InteractPrev;
-begin
- inherited InteractPrev;
- Text[TextDescription].Text := Theme.Main.Description[Interaction];
- Text[TextDescriptionLong].Text := Theme.Main.DescriptionLong[Interaction];
-end;
-
-procedure TScreenMain.InteractDec;
-begin
- inherited InteractDec;
- Text[TextDescription].Text := Theme.Main.Description[Interaction];
- Text[TextDescriptionLong].Text := Theme.Main.DescriptionLong[Interaction];
-end;
-
-procedure TScreenMain.InteractInc;
+procedure TScreenMain.SetInteraction(Num: integer);
begin
- inherited InteractInc;
+ inherited SetInteraction(Num);
Text[TextDescription].Text := Theme.Main.Description[Interaction];
Text[TextDescriptionLong].Text := Theme.Main.DescriptionLong[Interaction];
end;
diff --git a/cmake/src/screens/UScreenOptionsAdvanced.pas b/cmake/src/screens/UScreenOptionsAdvanced.pas
index f57ee865..0fb8153c 100644
--- a/cmake/src/screens/UScreenOptionsAdvanced.pas
+++ b/cmake/src/screens/UScreenOptionsAdvanced.pas
@@ -128,13 +128,30 @@ begin
LoadFromTheme(Theme.OptionsAdvanced);
//SelectLoadAnimation Hidden because it is useless atm
- //AddSelect(Theme.OptionsAdvanced.SelectLoadAnimation, Ini.LoadAnimation, ILoadAnimation);
- AddSelectSlide(Theme.OptionsAdvanced.SelectScreenFade, Ini.ScreenFade, IScreenFade);
- AddSelectSlide(Theme.OptionsAdvanced.SelectEffectSing, Ini.EffectSing, IEffectSing);
- AddSelectSlide(Theme.OptionsAdvanced.SelectLineBonus, Ini.LineBonus, ILineBonus);
- AddSelectSlide(Theme.OptionsAdvanced.SelectOnSongClick, Ini.OnSongClick, IOnSongClick);
- AddSelectSlide(Theme.OptionsAdvanced.SelectAskbeforeDel, Ini.AskBeforeDel, IAskbeforeDel);
- AddSelectSlide(Theme.OptionsAdvanced.SelectPartyPopup, Ini.PartyPopup, IPartyPopup);
+ //AddSelect(Theme.OptionsAdvanced.SelectLoadAnimation, Ini.LoadAnimation, ILoadAnimationTranslated);
+ Theme.OptionsAdvanced.SelectScreenFade.showArrows := true;
+ Theme.OptionsAdvanced.SelectScreenFade.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsAdvanced.SelectScreenFade, Ini.ScreenFade, IScreenFadeTranslated);
+
+ Theme.OptionsAdvanced.SelectEffectSing.showArrows := true;
+ Theme.OptionsAdvanced.SelectEffectSing.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsAdvanced.SelectEffectSing, Ini.EffectSing, IEffectSingTranslated);
+
+ Theme.OptionsAdvanced.SelectLineBonus.showArrows := true;
+ Theme.OptionsAdvanced.SelectLineBonus.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsAdvanced.SelectLineBonus, Ini.LineBonus, ILineBonusTranslated);
+
+ Theme.OptionsAdvanced.SelectOnSongClick.showArrows := true;
+ Theme.OptionsAdvanced.SelectOnSongClick.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsAdvanced.SelectOnSongClick, Ini.OnSongClick, IOnSongClickTranslated);
+
+ Theme.OptionsAdvanced.SelectAskbeforeDel.showArrows := true;
+ Theme.OptionsAdvanced.SelectAskbeforeDel.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsAdvanced.SelectAskbeforeDel, Ini.AskBeforeDel, IAskbeforeDelTranslated);
+
+ Theme.OptionsAdvanced.SelectPartyPopup.showArrows := true;
+ Theme.OptionsAdvanced.SelectPartyPopup.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsAdvanced.SelectPartyPopup, Ini.PartyPopup, IPartyPopupTranslated);
AddButton(Theme.OptionsAdvanced.ButtonExit);
if (Length(Button[0].Text)=0) then
diff --git a/cmake/src/screens/UScreenOptionsGame.pas b/cmake/src/screens/UScreenOptionsGame.pas
index 3c78363f..1d741d25 100644
--- a/cmake/src/screens/UScreenOptionsGame.pas
+++ b/cmake/src/screens/UScreenOptionsGame.pas
@@ -34,14 +34,14 @@ interface
{$I switches.inc}
uses
- UMenu,
SDL,
UDisplay,
- UMusic,
UFiles,
UIni,
- UThemes,
- USongs;
+ UMenu,
+ UMusic,
+ USongs,
+ UThemes;
type
TScreenOptionsGame = class(TMenu)
@@ -56,13 +56,15 @@ type
implementation
uses
- UGraphic,
- SysUtils;
+ SysUtils,
+ UGraphic;
-function TScreenOptionsGame.ParseInput(PressedKey: cardinal; CharCode: WideChar; PressedDown: boolean): boolean;
+function TScreenOptionsGame.ParseInput(PressedKey: cardinal;
+ CharCode: WideChar;
+ PressedDown: boolean): boolean;
begin
Result := true;
- if (PressedDown) then
+ if PressedDown then
begin // Key Down
// check normal keys
case WideCharUpperCase(CharCode)[1] of
@@ -80,7 +82,6 @@ begin
begin
AudioPlayback.PlaySound(SoundLib.Back);
RefreshSongs;
-
FadeTo(@ScreenOptions);
end;
SDLK_RETURN:
@@ -126,15 +127,34 @@ begin
old_Sorting := Ini.Sorting;
old_Tabs := Ini.Tabs;
+ Theme.OptionsGame.SelectPlayers.showArrows := true;
+ Theme.OptionsGame.SelectPlayers.oneItemOnly := true;
AddSelectSlide(Theme.OptionsGame.SelectPlayers, Ini.Players, IPlayers);
- AddSelectSlide(Theme.OptionsGame.SelectDifficulty, Ini.Difficulty, IDifficulty);
+
+ Theme.OptionsGame.SelectDifficulty.showArrows := true;
+ Theme.OptionsGame.SelectDifficulty.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsGame.SelectDifficulty, Ini.Difficulty, IDifficultyTranslated);
+
+ Theme.OptionsGame.SelectLanguage.showArrows := true;
+ Theme.OptionsGame.SelectLanguage.oneItemOnly := true;
AddSelectSlide(Theme.OptionsGame.SelectLanguage, Ini.Language, ILanguage);
- AddSelectSlide(Theme.OptionsGame.SelectTabs, Ini.Tabs, ITabs);
- AddSelectSlide(Theme.OptionsGame.SelectSorting, Ini.Sorting, ISorting);
- AddSelectSlide(Theme.OptionsGame.SelectDebug, Ini.Debug, IDebug);
+
+ Theme.OptionsGame.SelectTabs.showArrows := true;
+ Theme.OptionsGame.SelectTabs.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsGame.SelectTabs, Ini.Tabs, ITabsTranslated);
+
+ Theme.OptionsGame.SelectSorting.showArrows := true;
+ Theme.OptionsGame.SelectSorting.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsGame.SelectSorting, Ini.Sorting, ISortingTranslated);
+
+ Theme.OptionsGame.SelectDebug.showArrows := true;
+ Theme.OptionsGame.SelectDebug.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsGame.SelectDebug, Ini.Debug, IDebugTranslated);
+
+
AddButton(Theme.OptionsGame.ButtonExit);
- if (Length(Button[0].Text)=0) then
+ if (Length(Button[0].Text) = 0) then
AddButtonText(14, 20, Theme.Options.Description[7]);
end;
@@ -142,7 +162,7 @@ end;
//Refresh Songs Patch
procedure TScreenOptionsGame.RefreshSongs;
begin
-if (ini.Sorting <> old_Sorting) or (ini.Tabs <> old_Tabs) then
+ if (ini.Sorting <> old_Sorting) or (ini.Tabs <> old_Tabs) then
ScreenSong.Refresh;
end;
diff --git a/cmake/src/screens/UScreenOptionsGraphics.pas b/cmake/src/screens/UScreenOptionsGraphics.pas
index 896f3d99..ba1465b2 100644
--- a/cmake/src/screens/UScreenOptionsGraphics.pas
+++ b/cmake/src/screens/UScreenOptionsGraphics.pas
@@ -132,12 +132,29 @@ begin
inherited Create;
LoadFromTheme(Theme.OptionsGraphics);
+ Theme.OptionsGraphics.SelectResolution.showArrows := true;
+ Theme.OptionsGraphics.SelectResolution.oneItemOnly := true;
AddSelectSlide(Theme.OptionsGraphics.SelectResolution, Ini.Resolution, IResolution);
- AddSelectSlide(Theme.OptionsGraphics.SelectFullscreen, Ini.Fullscreen, IFullscreen);
+
+ Theme.OptionsGraphics.SelectFullscreen.showArrows := true;
+ Theme.OptionsGraphics.SelectFullscreen.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsGraphics.SelectFullscreen, Ini.Fullscreen, IFullScreenTranslated);
+
+ Theme.OptionsGraphics.SelectDepth.showArrows := true;
+ Theme.OptionsGraphics.SelectDepth.oneItemOnly := true;
AddSelectSlide(Theme.OptionsGraphics.SelectDepth, Ini.Depth, IDepth);
- AddSelectSlide(Theme.OptionsGraphics.SelectVisualizer, Ini.VisualizerOption, IVisualizer);
- AddSelectSlide(Theme.OptionsGraphics.SelectOscilloscope, Ini.Oscilloscope, IOscilloscope);
- AddSelectSlide(Theme.OptionsGraphics.SelectMovieSize, Ini.MovieSize, IMovieSize);
+
+ Theme.OptionsGraphics.SelectVisualizer.showArrows := true;
+ Theme.OptionsGraphics.SelectVisualizer.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsGraphics.SelectVisualizer, Ini.VisualizerOption, IVisualizerTranslated);
+
+ Theme.OptionsGraphics.SelectOscilloscope.showArrows := true;
+ Theme.OptionsGraphics.SelectOscilloscope.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsGraphics.SelectOscilloscope, Ini.Oscilloscope, IOscilloscopeTranslated);
+
+ Theme.OptionsGraphics.SelectMovieSize.showArrows := true;
+ Theme.OptionsGraphics.SelectMovieSize.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsGraphics.SelectMovieSize, Ini.MovieSize, IMovieSizeTranslated);
AddButton(Theme.OptionsGraphics.ButtonExit);
if (Length(Button[0].Text)=0) then
diff --git a/cmake/src/screens/UScreenOptionsLyrics.pas b/cmake/src/screens/UScreenOptionsLyrics.pas
index 7efe1cd2..035b0089 100644
--- a/cmake/src/screens/UScreenOptionsLyrics.pas
+++ b/cmake/src/screens/UScreenOptionsLyrics.pas
@@ -119,10 +119,17 @@ begin
LoadFromTheme(Theme.OptionsLyrics);
- AddSelectSlide(Theme.OptionsLyrics.SelectLyricsFont, Ini.LyricsFont, ILyricsFont);
- AddSelectSlide(Theme.OptionsLyrics.SelectLyricsEffect, Ini.LyricsEffect, ILyricsEffect);
- //AddSelect(Theme.OptionsLyrics.SelectSolmization, Ini.Solmization, ISolmization); GAH!!!!11 DIE!!!
- AddSelectSlide(Theme.OptionsLyrics.SelectNoteLines, Ini.NoteLines, INoteLines);
+ Theme.OptionsLyrics.SelectLyricsFont.showArrows := true;
+ Theme.OptionsLyrics.SelectLyricsFont.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsLyrics.SelectLyricsFont, Ini.LyricsFont, ILyricsFontTranslated);
+
+ Theme.OptionsLyrics.SelectLyricsEffect.showArrows := true;
+ Theme.OptionsLyrics.SelectLyricsEffect.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsLyrics.SelectLyricsEffect, Ini.LyricsEffect, ILyricsEffectTranslated);
+
+ Theme.OptionsLyrics.SelectNoteLines.showArrows := true;
+ Theme.OptionsLyrics.SelectNoteLines.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsLyrics.SelectNoteLines, Ini.NoteLines, INoteLinesTranslated);
AddButton(Theme.OptionsLyrics.ButtonExit);
if (Length(Button[0].Text)=0) then
diff --git a/cmake/src/screens/UScreenOptionsRecord.pas b/cmake/src/screens/UScreenOptionsRecord.pas
index 3737a134..cf799204 100644
--- a/cmake/src/screens/UScreenOptionsRecord.pas
+++ b/cmake/src/screens/UScreenOptionsRecord.pas
@@ -244,6 +244,8 @@ begin
InputDeviceNames[DeviceIndex] := AudioInputProcessor.DeviceList[DeviceIndex].Name;
end;
// add device-selection slider (InteractionID: 0)
+ Theme.OptionsRecord.SelectSlideCard.showArrows := true;
+ Theme.OptionsRecord.SelectSlideCard.oneItemOnly := true;
AddSelectSlide(Theme.OptionsRecord.SelectSlideCard, CurrentDeviceIndex, InputDeviceNames);
// init source-selection slider
@@ -252,6 +254,9 @@ begin
begin
InputSourceNames[SourceIndex] := InputDevice.Source[SourceIndex].Name;
end;
+
+ Theme.OptionsRecord.SelectSlideInput.showArrows := true;
+ Theme.OptionsRecord.SelectSlideInput.oneItemOnly := true;
// add source-selection slider (InteractionID: 1)
SelectInputSourceID := AddSelectSlide(Theme.OptionsRecord.SelectSlideInput,
InputDeviceCfg.Input, InputSourceNames);
diff --git a/cmake/src/screens/UScreenOptionsSound.pas b/cmake/src/screens/UScreenOptionsSound.pas
index 99ecb599..aa87ceb4 100644
--- a/cmake/src/screens/UScreenOptionsSound.pas
+++ b/cmake/src/screens/UScreenOptionsSound.pas
@@ -136,19 +136,39 @@ begin
LoadFromTheme(Theme.OptionsSound);
- AddSelectSlide(Theme.OptionsSound.SelectSlideVoicePassthrough,
- Ini.VoicePassthrough, IVoicePassthrough);
- AddSelectSlide(Theme.OptionsSound.SelectBackgroundMusic,
- Ini.BackgroundMusicOption, IBackgroundMusic);
- AddSelectSlide(Theme.OptionsSound.SelectMicBoost, Ini.MicBoost, IMicBoost);
+ Theme.OptionsSound.SelectSlideVoicePassthrough.showArrows := true;
+ Theme.OptionsSound.SelectSlideVoicePassthrough.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsSound.SelectSlideVoicePassthrough, Ini.VoicePassthrough, IVoicePassthroughTranslated);
+
+ Theme.OptionsSound.SelectBackgroundMusic.showArrows := true;
+ Theme.OptionsSound.SelectBackgroundMusic.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsSound.SelectBackgroundMusic, Ini.BackgroundMusicOption, IBackgroundMusicTranslated);
+
// TODO: - MicBoost needs to be moved to ScreenOptionsRecord
- AddSelectSlide(Theme.OptionsSound.SelectClickAssist, Ini.ClickAssist, IClickAssist);
- AddSelectSlide(Theme.OptionsSound.SelectBeatClick, Ini.BeatClick, IBeatClick);
+ Theme.OptionsSound.SelectMicBoost.showArrows := true;
+ Theme.OptionsSound.SelectMicBoost.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsSound.SelectMicBoost, Ini.MicBoost, IMicBoostTranslated);
+
+
+ Theme.OptionsSound.SelectClickAssist.showArrows := true;
+ Theme.OptionsSound.SelectClickAssist.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsSound.SelectClickAssist, Ini.ClickAssist, IClickAssistTranslated);
+
+ Theme.OptionsSound.SelectBeatClick.showArrows := true;
+ Theme.OptionsSound.SelectBeatClick.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsSound.SelectBeatClick, Ini.BeatClick, IBeatClickTranslated);
+
+ Theme.OptionsSound.SelectThreshold.showArrows := true;
+ Theme.OptionsSound.SelectThreshold.oneItemOnly := true;
AddSelectSlide(Theme.OptionsSound.SelectThreshold, Ini.ThresholdIndex, IThreshold);
- AddSelectSlide(Theme.OptionsSound.SelectSlidePreviewVolume,
- Ini.PreviewVolume, IPreviewVolume);
- AddSelectSlide(Theme.OptionsSound.SelectSlidePreviewFading,
- Ini.PreviewFading, IPreviewFading);
+
+ Theme.OptionsSound.SelectSlidePreviewVolume.showArrows := true;
+ Theme.OptionsSound.SelectSlidePreviewVolume.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsSound.SelectSlidePreviewVolume, Ini.PreviewVolume, IPreviewVolumeTranslated);
+
+ Theme.OptionsSound.SelectSlidePreviewFading.showArrows := true;
+ Theme.OptionsSound.SelectSlidePreviewFading.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsSound.SelectSlidePreviewFading, Ini.PreviewFading, IPreviewFadingTranslated);
AddButton(Theme.OptionsSound.ButtonExit);
if (Length(Button[0].Text) = 0) then
diff --git a/cmake/src/screens/UScreenOptionsThemes.pas b/cmake/src/screens/UScreenOptionsThemes.pas
index e44bfca8..1e7407f1 100644
--- a/cmake/src/screens/UScreenOptionsThemes.pas
+++ b/cmake/src/screens/UScreenOptionsThemes.pas
@@ -161,11 +161,17 @@ begin
LoadFromTheme(Theme.OptionsThemes);
+ Theme.OptionsThemes.SelectTheme.showArrows := true;
+ Theme.OptionsThemes.SelectTheme.oneItemOnly := true;
AddSelectSlide(Theme.OptionsThemes.SelectTheme, Ini.Theme, ITheme);
+ Theme.OptionsThemes.SelectSkin.showArrows := true;
+ Theme.OptionsThemes.SelectSkin.oneItemOnly := true;
SkinSelect := AddSelectSlide(Theme.OptionsThemes.SelectSkin, Ini.SkinNo, ISkin);
- AddSelectSlide(Theme.OptionsThemes.SelectColor, Ini.Color, IColor);
+ Theme.OptionsThemes.SelectColor.showArrows := true;
+ Theme.OptionsThemes.SelectColor.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsThemes.SelectColor, Ini.Color, IColorTranslated);
AddButton(Theme.OptionsThemes.ButtonExit);
if (Length(Button[0].Text)=0) then
diff --git a/cmake/src/screens/UScreenScore.pas b/cmake/src/screens/UScreenScore.pas
index f3f888b3..a01c7691 100644
--- a/cmake/src/screens/UScreenScore.pas
+++ b/cmake/src/screens/UScreenScore.pas
@@ -129,6 +129,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;
procedure onShowFinish; override;
function Draw: boolean; override;
@@ -191,6 +192,15 @@ begin
end;
end;
+function TScreenScore.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 TScreenScore.Create;
var
Player: integer;
diff --git a/cmake/src/screens/UScreenSing.pas b/cmake/src/screens/UScreenSing.pas
index c29c0e2c..ae75c74d 100644
--- a/cmake/src/screens/UScreenSing.pas
+++ b/cmake/src/screens/UScreenSing.pas
@@ -126,7 +126,8 @@ uses
ULanguage,
UNote,
URecord,
- USong;
+ USong,
+ UDisplay;
// method for input parsing. if false is returned, getnextwindow
// should be checked to know the next window to load;
@@ -253,6 +254,9 @@ constructor TScreenSing.Create;
begin
inherited Create;
+ //too dangerous, a mouse button is quickly pressed by accident
+ RightMbESC := false;
+
fShowVisualization := false;
fCurrentVideoPlaybackEngine := VideoPlayback;
@@ -297,8 +301,8 @@ begin
Static[StaticPausePopup].Visible := false;
Lyrics := TLyricEngine.Create(
- Skin_LyricsUpperX, Skin_LyricsUpperY, Skin_LyricsUpperW, Skin_LyricsUpperH,
- Skin_LyricsLowerX, Skin_LyricsLowerY, Skin_LyricsLowerW, Skin_LyricsLowerH);
+ Theme.LyricBar.UpperX, Theme.LyricBar.UpperY, Theme.LyricBar.UpperW, Theme.LyricBar.UpperH,
+ Theme.LyricBar.LowerX, Theme.LyricBar.LowerY, Theme.LyricBar.LowerW, Theme.LyricBar.LowerH);
LyricsSync := TLyricsSyncSource.Create();
end;
@@ -623,6 +627,9 @@ end;
procedure TScreenSing.onShowFinish;
begin
+ // hide cursor on singscreen show
+ Display.SetCursor;
+
// start lyrics
LyricsState.Resume();
@@ -643,6 +650,7 @@ begin
end;
Background.OnFinish;
+ Display.SetCursor;
end;
function TScreenSing.Draw: boolean;
diff --git a/cmake/src/screens/UScreenSong.pas b/cmake/src/screens/UScreenSong.pas
index 8f4dd5da..fa3c836e 100644
--- a/cmake/src/screens/UScreenSong.pas
+++ b/cmake/src/screens/UScreenSong.pas
@@ -34,22 +34,22 @@ interface
{$I switches.inc}
uses
- UMenu,
- SDL,
- UMusic,
- UFiles,
- UTime,
- UDisplay,
- USongs,
SysUtils,
+ SDL,
UCommon,
- ULog,
- UThemes,
- UTexture,
+ UDisplay,
+ UFiles,
+ UIni,
ULanguage,
+ ULog,
+ UMenu,
+ UMenuEqualizer,
+ UMusic,
USong,
- UIni,
- UMenuEqualizer;
+ USongs,
+ UTexture,
+ UThemes,
+ UTime;
type
TScreenSong = class(TMenu)
@@ -119,6 +119,7 @@ type
procedure SetScroll5;
procedure SetScroll6;
function ParseInput(PressedKey: cardinal; CharCode: WideChar; PressedDown: boolean): boolean; override;
+ function ParseMouse(MouseButton: integer; BtnDown: boolean; X, Y: integer): boolean; override;
function Draw: boolean; override;
procedure GenerateThumbnails();
procedure onShow; override;
@@ -175,7 +176,7 @@ begin
if CatSongs.VisibleSongs > 0 then
begin
I2:= 0;
- for I := low(CatSongs.Song) to High(Catsongs.Song) do
+ for I := Low(CatSongs.Song) to High(Catsongs.Song) do
begin
if CatSongs.Song[I].Visible then
inc(I2);
@@ -196,7 +197,7 @@ begin
if CatSongs.VisibleSongs > 0 then
begin
I2:= 0;
- for I := low(CatSongs.Song) to High(Catsongs.Song) do
+ for I := Low(CatSongs.Song) to High(Catsongs.Song) do
begin
if CatSongs.Song[I].Visible then
inc(I2);
@@ -280,7 +281,7 @@ begin
//Jump To Titel
if (SDL_ModState = (KMOD_LALT or KMOD_LSHIFT)) then
begin
- for I := 1 to high(CatSongs.Song) do
+ for I := 1 to High(CatSongs.Song) do
begin
if (CatSongs.Song[(I + Interaction) mod I2].Visible) and
(Length(CatSongs.Song[(I + Interaction) mod I2].Title)>0) and
@@ -300,7 +301,7 @@ begin
//Jump to Artist
else if (SDL_ModState = KMOD_LALT) then
begin
- for I := 1 to high(CatSongs.Song) do
+ for I := 1 to High(CatSongs.Song) do
begin
if (CatSongs.Song[(I + Interaction) mod I2].Visible) and
(Length(CatSongs.Song[(I + Interaction) mod I2].Artist)>0) and
@@ -395,25 +396,25 @@ begin
if (Songs.SongList.Count > 0) and
(Mode = smNormal) then
begin
- if (SDL_ModState = KMOD_LSHIFT) and (Ini.TabsAtStartup = 1) then //Random Category
+ if (SDL_ModState = KMOD_LSHIFT) and (Ini.TabsAtStartup = 1) then // random category
begin
- I2 := 0; //Count Cats
- for I:= 0 to high(CatSongs.Song) do
+ I2 := 0; // count cats
+ for I := 0 to High(CatSongs.Song) do
begin
if CatSongs.Song[I].Main then
Inc(I2);
end;
- I2 := Random(I2)+1; //Zufall
+ I2 := Random(I2 + 1); // random and include I2
- //Find Cat:
- for I:= 0 to high(CatSongs.Song) do
+ // find cat:
+ for I := 0 to High(CatSongs.Song) do
begin
if CatSongs.Song[I].Main then
Dec(I2);
- if (I2<=0) then
+ if (I2 <= 0) then
begin
- //Show Cat in Top Left Mod
+ // show cat in top left mod
ShowCatTL (I);
Interaction := I;
@@ -426,38 +427,38 @@ begin
end;
end;
end
- else if (SDL_ModState = KMOD_LCTRL) and (Ini.TabsAtStartup = 1) then //random in All Categorys
+ else if (SDL_ModState = KMOD_LCTRL) and (Ini.TabsAtStartup = 1) then // random in all categories
begin
repeat
- I2 := Random(high(CatSongs.Song)+1) + 1;
+ I2 := Random(High(CatSongs.Song) + 1);
until (not CatSongs.Song[I2].Main);
- //Search Cat
+ // search cat
for I := I2 downto 0 do
begin
if CatSongs.Song[I].Main then
break;
end;
- //In I is now the categorie in I2 the song
+ // in I is now the categorie in I2 the song
- //Choose Cat
+ // choose cat
CatSongs.ShowCategoryList;
- //Show Cat in Top Left Mod
+ // show cat in top left mod
ShowCatTL (I);
CatSongs.ClickCategoryButton(I);
SelectNext;
- //Fix: Not Existing Song selected:
- //if (I+1=I2) then
+ // Fix: not existing song selected:
+ //if (I + 1 = I2) then
Inc(I2);
- //Choose Song
- SkipTo(I2-I);
+ // choose song
+ SkipTo(I2 - I);
end
- else //Random in one Category
+ else // random in one category
begin
SkipTo(Random(CatSongs.VisibleSongs));
end;
@@ -489,7 +490,7 @@ begin
break;
end;
if (I <= 1) then
- Interaction := high(CatSongs.Song)
+ Interaction := High(CatSongs.Song)
else
Interaction := I - 1;
@@ -611,8 +612,8 @@ begin
while not catsongs.Song[I].Main do
begin
Inc (I);
- if (I > high(catsongs.Song)) then
- I := low(catsongs.Song);
+ if (I > High(catsongs.Song)) then
+ I := Low(catsongs.Song);
end;
Interaction := I;
@@ -655,8 +656,8 @@ begin
if catsongs.Song[I].Main then
Inc(I2);
Dec (I);
- if (I < low(catsongs.Song)) then
- I := high(catsongs.Song);
+ if (I < Low(catsongs.Song)) then
+ I := High(catsongs.Song);
end;
Interaction := I;
@@ -737,6 +738,26 @@ begin
end; // if (PressedDown)
end;
+function TScreenSong.ParseMouse(MouseButton: integer; BtnDown: boolean; X, Y: integer): boolean;
+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);
+
+ //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);
+
+ //LMB anywhere starts
+ if (MouseButton = SDL_BUTTON_LEFT) and BtnDown then
+ ParseInput(SDLK_RETURN, #0, true);
+end;
+
constructor TScreenSong.Create;
var
i: integer;
@@ -1312,7 +1333,7 @@ begin
else
begin
//Change Pos of all Buttons
- for B := low(Button) to high(Button) do
+ for B := Low(Button) to High(Button) do
begin
Button[B].Visible := CatSongs.Song[B].Visible; //Adjust Visibility
if Button[B].Visible then //Only Change Pos for Visible Buttons
@@ -1701,41 +1722,40 @@ var
I, I2: integer;
begin
case PlaylistMan.Mode of
- smNormal: //All Songs Just Select Random Song
+ smNormal: // all songs just select random song
begin
- //When Tabs are activated then use Tab Method
+ // when tabs are activated then use tab method
if (Ini.TabsAtStartup = 1) then
begin
repeat
- I2 := Random(high(CatSongs.Song)+1) - low(CatSongs.Song)+1;
+ I2 := Low(CatSongs.Song) + Random(High(CatSongs.Song) + 1 - Low(CatSongs.Song));
until CatSongs.Song[I2].Main = false;
- //Search Cat
- for I := I2 downto low(CatSongs.Song) do
+ // search cat
+ for I := I2 downto Low(CatSongs.Song) do
begin
if CatSongs.Song[I].Main then
break;
end;
- //In I ist jetzt die Kategorie in I2 der Song
- //I is the CatNum, I2 is the No of the Song within this Cat
+ // I is the cat number, I2 is the no of the song within this cat
- //Choose Cat
+ // choose cat
CatSongs.ShowCategoryList;
- //Show Cat in Top Left Mod
- ShowCatTL (I);
+ // show cat in top left mod
+ ShowCatTL(I);
CatSongs.ClickCategoryButton(I);
SelectNext;
- //Choose Song
- SkipTo(I2-I);
+ // choose song
+ SkipTo(I2 - I);
end
- //When Tabs are deactivated use easy Method
+ // when tabs are deactivated use easy method
else
SkipTo(Random(CatSongs.VisibleSongs));
end;
- smPartyMode: //One Category Select Category and Select Random Song
+ smPartyMode: // one category select category and select random song
begin
CatSongs.ShowCategoryList;
CatSongs.ClickCategoryButton(PlaylistMan.CurPlayList);
@@ -1746,7 +1766,7 @@ begin
SkipTo(Random(CatSongs.VisibleSongs));
end;
- smPlaylistRandom: //Playlist: Select Playlist and Select Random Song
+ smPlaylistRandom: // playlist: select playlist and select random song
begin
PlaylistMan.SetPlayList(PlaylistMan.CurPlayList);
@@ -1846,19 +1866,19 @@ begin
//Set Visibility of Party Statics and Text
Visible := (Mode = smPartyMode);
- for I := 0 to high(StaticParty) do
+ for I := 0 to High(StaticParty) do
Static[StaticParty[I]].Visible := Visible;
- for I := 0 to high(TextParty) do
+ for I := 0 to High(TextParty) do
Text[TextParty[I]].Visible := Visible;
//Set Visibility of Non Party Statics and Text
Visible := not Visible;
- for I := 0 to high(StaticNonParty) do
+ for I := 0 to High(StaticNonParty) do
Static[StaticNonParty[I]].Visible := Visible;
- for I := 0 to high(TextNonParty) do
+ for I := 0 to High(TextNonParty) do
Text[TextNonParty[I]].Visible := Visible;
end;
diff --git a/cmake/src/screens/UScreenTop5.pas b/cmake/src/screens/UScreenTop5.pas
index 23405ebb..1013a9b5 100644
--- a/cmake/src/screens/UScreenTop5.pas
+++ b/cmake/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;
@@ -69,10 +70,12 @@ uses
UIni,
UNote;
-function TScreenTop5.ParseInput(PressedKey: cardinal; CharCode: WideChar; PressedDown: boolean): boolean;
+function TScreenTop5.ParseInput(PressedKey: cardinal;
+ CharCode: WideChar;
+ PressedDown: boolean): boolean;
begin
Result := true;
- if (PressedDown) then
+ if PressedDown then
begin
// check normal keys
case WideCharUpperCase(CharCode)[1] of
@@ -103,6 +106,16 @@ 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
+ //left-click anywhere sends return
+ ParseInput(SDLK_RETURN, #0, true);
+end;
+
constructor TScreenTop5.Create;
var
I: integer;
@@ -111,18 +124,16 @@ begin
LoadFromTheme(Theme.Top5);
- TextLevel := AddText(Theme.Top5.TextLevel);
+ TextLevel := AddText(Theme.Top5.TextLevel);
TextArtistTitle := AddText(Theme.Top5.TextArtistTitle);
for I := 0 to 4 do
- StaticNumber[I+1] := AddStatic( Theme.Top5.StaticNumber[I] );
-
- for I := 0 to 4 do
- TextNumber[I+1] := AddText(Theme.Top5.TextNumber[I]);
- for I := 0 to 4 do
- TextName[I+1] := AddText(Theme.Top5.TextName[I]);
- for I := 0 to 4 do
- TextScore[I+1] := AddText(Theme.Top5.TextScore[I]);
+ begin
+ StaticNumber[I+1] := AddStatic(Theme.Top5.StaticNumber[I]);
+ TextNumber[I+1] := AddText (Theme.Top5.TextNumber[I]);
+ TextName[I+1] := AddText (Theme.Top5.TextName[I]);
+ TextScore[I+1] := AddText (Theme.Top5.TextScore[I]);
+ end;
end;
@@ -159,7 +170,7 @@ begin
Text[TextScore[I]].Text := IntToStr(CurrentSong.Score[Ini.Difficulty, I-1].Score);
end;
- for I := Length(CurrentSong.Score[Ini.Difficulty])+1 to 5 do
+ for I := Length(CurrentSong.Score[Ini.Difficulty]) + 1 to 5 do
begin
Static[StaticNumber[I]].Visible := false;
Text[TextNumber[I]].Visible := false;