aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-04-05 21:09:52 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-04-05 21:09:52 +0000
commit9d01c8801db29d6ff3d64ef81b84321549d84688 (patch)
tree142baabaca02828cc5ad234246b1b6157bf04bb6 /Game/Code/Screens
parent939b36edbd126e5ce4d53d4c3d2fe157ae64149d (diff)
downloadusdx-9d01c8801db29d6ff3d64ef81b84321549d84688.tar.gz
usdx-9d01c8801db29d6ff3d64ef81b84321549d84688.tar.xz
usdx-9d01c8801db29d6ff3d64ef81b84321549d84688.zip
Added Advanced Screen and Options in TIni
Options working now only for Effect Perfect and Effect Golden. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@65 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Screens/UScreenEditSub.pas4
-rw-r--r--Game/Code/Screens/UScreenOptions.pas11
-rw-r--r--Game/Code/Screens/UScreenOptionsAdvanced.pas95
-rw-r--r--Game/Code/Screens/UScreenOptionsGraphics.pas1
-rw-r--r--Game/Code/Screens/UScreenSing.pas14
-rw-r--r--Game/Code/Screens/UScreenSongMenu.pas4
6 files changed, 114 insertions, 15 deletions
diff --git a/Game/Code/Screens/UScreenEditSub.pas b/Game/Code/Screens/UScreenEditSub.pas
index 52cd0b26..6094edd1 100644
--- a/Game/Code/Screens/UScreenEditSub.pas
+++ b/Game/Code/Screens/UScreenEditSub.pas
@@ -1096,6 +1096,8 @@ begin
MidiOut.ProductName := 'Microsoft GS Wavetable SW Synth'; // for my kxproject without midi table
MidiOut.Open;
+ //MidiOut.SetVolume(65535, 65535);
+
CzyscNuty;
@@ -1113,7 +1115,7 @@ begin
Music.Open(Path + AktSong.Mp3);
//Set Down Music Volume for Better hearability of Midi Sounds
- Music.SetVolume(40);
+ //Music.SetVolume(40);
Lyric.Clear;
Lyric.X := 400;
diff --git a/Game/Code/Screens/UScreenOptions.pas b/Game/Code/Screens/UScreenOptions.pas
index f24b29c1..2a8d0d9a 100644
--- a/Game/Code/Screens/UScreenOptions.pas
+++ b/Game/Code/Screens/UScreenOptions.pas
@@ -70,6 +70,11 @@ begin
end;
if SelInteraction = 6 then begin
+ Music.PlayStart;
+ FadeTo(@ScreenOptionsAdvanced);
+ end;
+
+ if SelInteraction = 7 then begin
Ini.Save;
Music.PlayBack;
FadeTo(@ScreenMain);
@@ -182,10 +187,14 @@ begin
if (Length(Button[5].Text)=0) then
AddButtonText(14, 20, Theme.Options.Description[5]);
- AddButton(Theme.Options.ButtonExit);
+ AddButton(Theme.Options.ButtonAdvanced);
if (Length(Button[6].Text)=0) then
AddButtonText(14, 20, Theme.Options.Description[6]);
+ AddButton(Theme.Options.ButtonExit);
+ if (Length(Button[7].Text)=0) then
+ AddButtonText(14, 20, Theme.Options.Description[7]);
+
for I := 0 to High(Theme.Options.Static) do
AddStatic(Theme.Options.Static[I]);
diff --git a/Game/Code/Screens/UScreenOptionsAdvanced.pas b/Game/Code/Screens/UScreenOptionsAdvanced.pas
new file mode 100644
index 00000000..bfbd54a7
--- /dev/null
+++ b/Game/Code/Screens/UScreenOptionsAdvanced.pas
@@ -0,0 +1,95 @@
+unit UScreenOptionsAdvanced;
+
+interface
+
+uses
+ UMenu, SDL, UDisplay, UMusic, UPliki, UIni, UThemes;
+
+type
+ TScreenOptionsAdvanced = class(TMenu)
+ public
+ constructor Create(Back: String); override;
+ function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override;
+ procedure onShow; override;
+ end;
+
+implementation
+
+uses UGraphic;
+
+function TScreenOptionsAdvanced.ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean;
+begin
+ Result := true;
+ If (PressedDown) Then
+ begin // Key Down
+ case PressedKey of
+ SDLK_ESCAPE :
+ begin
+ Ini.Save;
+ Music.PlayBack;
+ FadeTo(@ScreenOptions);
+ end;
+ SDLK_RETURN:
+ begin
+ if SelInteraction = 6 then begin
+ Ini.Save;
+ Music.PlayBack;
+ FadeTo(@ScreenOptions);
+ end;
+ end;
+ SDLK_DOWN:
+ InteractNext;
+ SDLK_UP :
+ InteractPrev;
+ SDLK_RIGHT:
+ begin
+ if (SelInteraction >= 0) and (SelInteraction <= 5) then begin
+ Music.PlayOption;
+ InteractInc;
+ end;
+ end;
+ SDLK_LEFT:
+ begin
+ if (SelInteraction >= 0) and (SelInteraction <= 5) then begin
+ Music.PlayOption;
+ InteractDec;
+ end;
+ end;
+ end;
+ end;
+end;
+
+constructor TScreenOptionsAdvanced.Create(Back: String);
+var
+ I: integer;
+begin
+ inherited Create(Back);
+
+ AddBackground(Theme.OptionsAdvanced.Background.Tex);
+
+ for I := 0 to High(Theme.OptionsAdvanced.Static) do
+ AddStatic(Theme.OptionsAdvanced.Static[I]);
+
+ for I := 0 to High(Theme.OptionsAdvanced.Text) do
+ AddText(Theme.OptionsAdvanced.Text[I]);
+
+ AddSelect(Theme.OptionsAdvanced.SelectLoadAnimation, Ini.LoadAnimation, ILoadAnimation);
+ AddSelect(Theme.OptionsAdvanced.SelectEffectPerfect, Ini.EffectPerfect, IEffectPerfect);
+ AddSelect(Theme.OptionsAdvanced.SelectEffectGolden, Ini.EffectGolden, IEffectGolden);
+ AddSelect(Theme.OptionsAdvanced.SelectLineBonus, Ini.LineBonus, ILineBonus);
+ AddSelectSlide(Theme.OptionsAdvanced.SelectOnSongClick, Ini.OnSongClick, IOnSongClick);
+ AddSelect(Theme.OptionsAdvanced.SelectAskbeforeDel, Ini.AskbeforeDel, IAskbeforeDel);
+
+ AddButton(Theme.OptionsAdvanced.ButtonExit);
+ if (Length(Button[0].Text)=0) then
+ AddButtonText(14, 20, Theme.Options.Description[6]);
+
+ Interaction := 0;
+end;
+
+procedure TScreenOptionsAdvanced.onShow;
+begin
+ Interaction := 0;
+end;
+
+end.
diff --git a/Game/Code/Screens/UScreenOptionsGraphics.pas b/Game/Code/Screens/UScreenOptionsGraphics.pas
index 62648e0c..d39a10c8 100644
--- a/Game/Code/Screens/UScreenOptionsGraphics.pas
+++ b/Game/Code/Screens/UScreenOptionsGraphics.pas
@@ -84,7 +84,6 @@ begin
AddSelect(Theme.OptionsGraphics.SelectFullscreen, Ini.Fullscreen, IFullscreen);
AddSelect(Theme.OptionsGraphics.SelectDepth, Ini.Depth, IDepth);
AddSelect(Theme.OptionsGraphics.SelectOscilloscope, Ini.Oscilloscope, IOscilloscope);
- AddSelect(Theme.OptionsGraphics.SelectLineBonus, Ini.LineBonus, ILineBonus);
AddSelect(Theme.OptionsGraphics.SelectMovieSize, Ini.MovieSize, IMovieSize);
diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas
index ee4bedc8..d684dc3c 100644
--- a/Game/Code/Screens/UScreenSing.pas
+++ b/Game/Code/Screens/UScreenSing.pas
@@ -1089,18 +1089,12 @@ begin
//Generate Steps 0 to 8
A := Floor(A / (B * Czesci[0].Czesc[S].TotalNotes / Czesci[0].Wartosc) * 8);
+
+ //Generate Text
if A >= 8 then
- Player[I].LineBonus_Text := Language.Translate('LINEBONUS_PERFECT')
- else if (A = 6) or (A = 7) then
- Player[I].LineBonus_Text := Language.Translate('LINEBONUS_BETTER')
- else if A = 5 then
- Player[I].LineBonus_Text := Language.Translate('LINEBONUS_GOOD')
- else if (A = 3) or (A = 4) then
- Player[I].LineBonus_Text := Language.Translate('LINEBONUS_NORMAL')
- else if A = 2 then
- Player[I].LineBonus_Text := Language.Translate('LINEBONUS_BAD')
+ Player[I].LineBonus_Text := Theme.Sing.LineBonusText[8]
else
- Player[I].LineBonus_Text := Language.Translate('LINEBONUS_WORST');
+ Player[I].LineBonus_Text := Theme.Sing.LineBonusText[Floor(A)];
//PhrasenBonus give Points
Player[I].ScoreLine := Player[I].ScoreLine + (1000 / (Length(Czesci[0].Czesc) - NumEmptySentences) * A / 8);
diff --git a/Game/Code/Screens/UScreenSongMenu.pas b/Game/Code/Screens/UScreenSongMenu.pas
index 0b4a9d91..3ccba228 100644
--- a/Game/Code/Screens/UScreenSongMenu.pas
+++ b/Game/Code/Screens/UScreenSongMenu.pas
@@ -250,7 +250,7 @@ begin
Button[3].Visible := False;
SelectsS[0].Visible := False;
Button[2].Visible := True;
- Button[3].Text[0].Text := Language.Translate('SONG_MENU_PLAYLIST_NOEXISTING');
+ Button[2].Text[0].Text := Language.Translate('SONG_MENU_PLAYLIST_NOEXISTING');
end;
end;
@@ -311,7 +311,7 @@ begin
Button[3].Visible := False;
SelectsS[0].Visible := False;
Button[2].Visible := True;
- Button[3].Text[0].Text := Language.Translate('SONG_MENU_PLAYLIST_NOEXISTING');
+ Button[2].Text[0].Text := Language.Translate('SONG_MENU_PLAYLIST_NOEXISTING');
Interaction := 2;
end;
end;