aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-04-29 17:50:29 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-04-29 17:50:29 +0000
commitbda4fa8e57ca63a1d591433f120b4226d6a5d327 (patch)
tree745df64699fdc0b6e2deafc99107f86166232aa9 /Game/Code/Screens
parent23e4d293dc19ce496da33b3929c9b71952148e86 (diff)
downloadusdx-bda4fa8e57ca63a1d591433f120b4226d6a5d327.tar.gz
usdx-bda4fa8e57ca63a1d591433f120b4226d6a5d327.tar.xz
usdx-bda4fa8e57ca63a1d591433f120b4226d6a5d327.zip
Added 2 new Buttons to ScreenMain: Multi and Stats
Updated Language Fiels to Fit with new Buttons Some CodeClean Up in Menu Class and in Screens Some minor Bug fixes I forgot about Added ability to group Buttons within a Screen New Theme Object: ButtonCollection: Same Attributes as a Button Plus FirstChild: Defining the First Button in the Group. For Example: SingSolo is 1, SingMulti Button is 2, in ScreenMain Added Attribute to Theme Button: Parent: Number of the assigned Group, 0 for no Group Used new Abilitys in MainScreen git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@149 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Screens')
-rw-r--r--Game/Code/Screens/UScreenCredits.pas6
-rw-r--r--Game/Code/Screens/UScreenEdit.pas6
-rw-r--r--Game/Code/Screens/UScreenEditConvert.pas6
-rw-r--r--Game/Code/Screens/UScreenEditHeader.pas6
-rw-r--r--Game/Code/Screens/UScreenEditSub.pas6
-rw-r--r--Game/Code/Screens/UScreenLevel.pas8
-rw-r--r--Game/Code/Screens/UScreenLoading.pas16
-rw-r--r--Game/Code/Screens/UScreenMain.pas79
-rw-r--r--Game/Code/Screens/UScreenName.pas9
-rw-r--r--Game/Code/Screens/UScreenOpen.pas6
-rw-r--r--Game/Code/Screens/UScreenOptions.pas91
-rw-r--r--Game/Code/Screens/UScreenOptionsAdvanced.pas14
-rw-r--r--Game/Code/Screens/UScreenOptionsGame.pas14
-rw-r--r--Game/Code/Screens/UScreenOptionsGraphics.pas14
-rw-r--r--Game/Code/Screens/UScreenOptionsLyrics.pas14
-rw-r--r--Game/Code/Screens/UScreenOptionsRecord.pas14
-rw-r--r--Game/Code/Screens/UScreenOptionsSound.pas15
-rw-r--r--Game/Code/Screens/UScreenOptionsThemes.pas14
-rw-r--r--Game/Code/Screens/UScreenPartyNewRound.pas13
-rw-r--r--Game/Code/Screens/UScreenPartyOptions.pas45
-rw-r--r--Game/Code/Screens/UScreenPartyPlayer.pas8
-rw-r--r--Game/Code/Screens/UScreenPartyScore.pas8
-rw-r--r--Game/Code/Screens/UScreenPartyWin.pas8
-rw-r--r--Game/Code/Screens/UScreenScore.pas54
-rw-r--r--Game/Code/Screens/UScreenSing.pas8
-rw-r--r--Game/Code/Screens/UScreenSong.pas8
-rw-r--r--Game/Code/Screens/UScreenSongJumpto.pas11
-rw-r--r--Game/Code/Screens/UScreenSongMenu.pas48
-rw-r--r--Game/Code/Screens/UScreenStatDetail.pas26
-rw-r--r--Game/Code/Screens/UScreenStatMain.pas13
-rw-r--r--Game/Code/Screens/UScreenTop5.pas8
31 files changed, 160 insertions, 436 deletions
diff --git a/Game/Code/Screens/UScreenCredits.pas b/Game/Code/Screens/UScreenCredits.pas
index 2e5f4abc..0411c7b6 100644
--- a/Game/Code/Screens/UScreenCredits.pas
+++ b/Game/Code/Screens/UScreenCredits.pas
@@ -14,7 +14,7 @@ type
Credits_Alpha: Cardinal;
Fadeout: boolean;
- constructor Create(Back: String); override;
+ constructor Create; override;
function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override;
function Draw: boolean; override;
procedure onShow; override;
@@ -97,11 +97,11 @@ begin
end; //fi
end;
-constructor TScreenCredits.Create(Back: String);
+constructor TScreenCredits.Create;
var
I: integer;
begin
- inherited Create(Back);
+ inherited Create;
AddBackground(Theme.Loading.Background.Tex);
diff --git a/Game/Code/Screens/UScreenEdit.pas b/Game/Code/Screens/UScreenEdit.pas
index aa3301a7..00df0418 100644
--- a/Game/Code/Screens/UScreenEdit.pas
+++ b/Game/Code/Screens/UScreenEdit.pas
@@ -11,7 +11,7 @@ type
FadeOut: boolean;
Path: string;
FileName: string;}
- constructor Create(Back: String); override;
+ constructor Create; override;
procedure onShow; override;
function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override;
{ function Draw: boolean; override;
@@ -63,9 +63,9 @@ begin
end;
end;
-constructor TScreenEdit.Create(Back: String);
+constructor TScreenEdit.Create;
begin
- inherited Create(Back);
+ inherited Create;
AddButton(400-200, 100 + 0*70, 400, 40, Skin.GetTextureFileName('ButtonF'));
AddButtonText(10, 5, 0, 0, 0, 'Convert Midi to Txt');
// Button[High(Button)].Text[0].Size := 11;
diff --git a/Game/Code/Screens/UScreenEditConvert.pas b/Game/Code/Screens/UScreenEditConvert.pas
index 68742535..62a50b3e 100644
--- a/Game/Code/Screens/UScreenEditConvert.pas
+++ b/Game/Code/Screens/UScreenEditConvert.pas
@@ -58,7 +58,7 @@ type
procedure Extract;
procedure MidiFile1MidiEvent(event: PMidiEvent);
function SelectedNumber: integer;
- constructor Create(Back: String); override;
+ constructor Create; override;
procedure onShow; override;
function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override;
function Draw: boolean; override;
@@ -299,11 +299,11 @@ begin
MidiOut.PutShort(event.event, event.data1, event.data2);
end;
-constructor TScreenEditConvert.Create(Back: String);
+constructor TScreenEditConvert.Create;
var
P: integer;
begin
- inherited Create(Back);
+ inherited Create;
AddButton(40, 20, 100, 40, Skin.GetTextureFileName('ButtonF'));
AddButtonText(15, 5, 0, 0, 0, 'Open');
// Button[High(Button)].Text[0].Size := 11;
diff --git a/Game/Code/Screens/UScreenEditHeader.pas b/Game/Code/Screens/UScreenEditHeader.pas
index a601555a..dbdd186c 100644
--- a/Game/Code/Screens/UScreenEditHeader.pas
+++ b/Game/Code/Screens/UScreenEditHeader.pas
@@ -35,7 +35,7 @@ type
Sel: array[0..11] of boolean;
procedure SetRoundButtons;
- constructor Create(Back: String); override;
+ constructor Create; override;
procedure onShow; override;
function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override;
{ function Draw: boolean; override;
@@ -124,9 +124,9 @@ begin
end;
end;
-constructor TScreenEditHeader.Create(Back: String);
+constructor TScreenEditHeader.Create;
begin
- inherited Create(Back);
+ inherited Create;
AddButton(40, 20, 100, 40, Skin.GetTextureFileName('ButtonF'));
AddButtonText(15, 5, 'Open');
diff --git a/Game/Code/Screens/UScreenEditSub.pas b/Game/Code/Screens/UScreenEditSub.pas
index 6094edd1..a665ba1c 100644
--- a/Game/Code/Screens/UScreenEditSub.pas
+++ b/Game/Code/Screens/UScreenEditSub.pas
@@ -62,7 +62,7 @@ type
FadeOut: boolean;
Path: string;
FileName: string;
- constructor Create(Back: String); override;
+ constructor Create; override;
procedure onShow; override;
function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override;
function ParseInputEditText(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean;
@@ -1035,9 +1035,9 @@ begin
end;
-constructor TScreenEditSub.Create(Back: String);
+constructor TScreenEditSub.Create;
begin
- inherited Create(Back);
+ inherited Create;
SetLength(Player, 1);
// linijka
diff --git a/Game/Code/Screens/UScreenLevel.pas b/Game/Code/Screens/UScreenLevel.pas
index 28aa40ea..80d42773 100644
--- a/Game/Code/Screens/UScreenLevel.pas
+++ b/Game/Code/Screens/UScreenLevel.pas
@@ -68,18 +68,12 @@ var
begin
inherited Create;
- AddBackground(Theme.Level.Background.Tex);
+ LoadFromTheme(Theme.Level);
AddButton(Theme.Level.ButtonEasy);
AddButton(Theme.Level.ButtonMedium);
AddButton(Theme.Level.ButtonHard);
- for I := 0 to High(Theme.Level.Static) do
- AddStatic(Theme.Level.Static[I]);
-
- for I := 0 to High(Theme.Level.Text) do
- AddText(Theme.Level.Text[I]);
-
Interaction := 0;
end;
diff --git a/Game/Code/Screens/UScreenLoading.pas b/Game/Code/Screens/UScreenLoading.pas
index 5cc938bb..438b606e 100644
--- a/Game/Code/Screens/UScreenLoading.pas
+++ b/Game/Code/Screens/UScreenLoading.pas
@@ -9,7 +9,7 @@ type
TScreenLoading = class(TMenu)
public
Fadeout: boolean;
- constructor Create(Back: String); override;
+ constructor Create; override;
function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override;
function GetBGTexNum: GLUInt;
procedure onShow; override;
@@ -24,19 +24,11 @@ begin
Result := true;
end;
-constructor TScreenLoading.Create(Back: String);
-var
- I: integer;
+constructor TScreenLoading.Create;
begin
- inherited Create(Back);
+ inherited Create;
- AddBackground(Theme.Loading.Background.Tex);
-
- for I := 0 to High(Theme.Loading.Static) do
- AddStatic(Theme.Loading.Static[I]);
-
- for I := 0 to High(Theme.Loading.Text) do
- AddText(Theme.Loading.Text[I]);
+ LoadFromTheme(Theme.Loading);
Fadeout := false;
end;
diff --git a/Game/Code/Screens/UScreenMain.pas b/Game/Code/Screens/UScreenMain.pas
index 4c822640..49bd98ee 100644
--- a/Game/Code/Screens/UScreenMain.pas
+++ b/Game/Code/Screens/UScreenMain.pas
@@ -16,6 +16,8 @@ type
procedure onShow; override;
procedure InteractNext; override;
procedure InteractPrev; override;
+ procedure InteractInc; override;
+ procedure InteractDec; override;
procedure UpdateLCD;
procedure SetAnimationProgress(Progress: real); override;
//function Draw: boolean; override;
@@ -84,6 +86,7 @@ begin
SDLK_RETURN:
begin
+ //Solo
if (Interaction = 0) and (Length(Songs.Song) >= 1) then begin
Music.PlayStart;
if (Ini.Players >= 0) and (Ini.Players <= 3) then PlayersPlay := Ini.Players + 1;
@@ -92,23 +95,44 @@ begin
ScreenName.Goto_SingScreen := False;
FadeTo(@ScreenName);
end;
+
+ //Multi
if Interaction = 1 then begin
+ if (Ini.Players >= 1) AND (Length(DLLMan.Plugins)>=1) then
+ begin
+ Music.PlayStart;
+ FadeTo(@ScreenPartyOptions);
+ end;
+ end;
+
+ //Stats
+ if Interaction = 2 then begin
+ Music.PlayStart;
+ FadeTo(@ScreenStatMain);
+ end;
+
+ //Editor
+ if Interaction = 3 then begin
Music.PlayStart;
FadeTo(@ScreenEdit);
end;
- if Interaction = 2 then begin
+
+ //Options
+ if Interaction = 4 then begin
Music.PlayStart;
FadeTo(@ScreenOptions);
end;
- if Interaction = 3 then begin
+
+ //Exit
+ if Interaction = 5 then begin
Result := false;
end;
end;
// Up and Down could be done at the same time,
// but I don't want to declare variables inside
// functions like this one, called so many times
- SDLK_DOWN: InteractNext;
- SDLK_UP: InteractPrev;
+ SDLK_DOWN: InteractInc;
+ SDLK_UP: InteractDec;
SDLK_RIGHT: InteractNext;
SDLK_LEFT: InteractPrev;
end;
@@ -127,27 +151,28 @@ var
begin
inherited Create;
-// AddButton(400-200, 320, 400, 60, Skin.GameStart);
-// AddButton(400-200, 390, 400, 60, Skin.Editor);
-// AddButton(400-200, 460, 400, 60, Skin.Options);
-// AddButton(400-200, 530, 400, 60, Skin.Exit);
+ //----------------
+ //Attention ^^:
+ //New Creation Order needed because of LoadFromTheme
+ //and Button Collections.
+ //At First Custom Texts and Statics
+ //Then LoadFromTheme
+ //after LoadFromTheme the Buttons and Selects
+ //----------------
+
+
+ TextDescription := AddText(Theme.Main.TextDescription);
+ TextDescriptionLong := AddText(Theme.Main.TextDescriptionLong);
- AddBackground(Theme.Main.Background.Tex);
+ LoadFromTheme(Theme.Main);
AddButton(Theme.Main.ButtonSolo);
+ AddButton(Theme.Main.ButtonMulti);
+ AddButton(Theme.Main.ButtonStat);
AddButton(Theme.Main.ButtonEditor);
AddButton(Theme.Main.ButtonOptions);
AddButton(Theme.Main.ButtonExit);
- for I := 0 to High(Theme.Main.Static) do
- AddStatic(Theme.Main.Static[I]);
-
- for I := 0 to High(Theme.Main.Text) do
- AddText(Theme.Main.Text[I]);
-
- TextDescription := AddText(Theme.Main.TextDescription);
- TextDescriptionLong := AddText(Theme.Main.TextDescriptionLong);
-
Interaction := 0;
end;
@@ -175,6 +200,24 @@ begin
Light.LightOne(0, 200);
end;
+procedure TScreenMain.InteractDec;
+begin
+ inherited InteractDec;
+ Text[TextDescription].Text := Theme.Main.Description[Interaction];
+ Text[TextDescriptionLong].Text := Theme.Main.DescriptionLong[Interaction];
+ UpdateLCD;
+ Light.LightOne(0, 200);
+end;
+
+procedure TScreenMain.InteractInc;
+begin
+ inherited InteractInc;
+ Text[TextDescription].Text := Theme.Main.Description[Interaction];
+ Text[TextDescriptionLong].Text := Theme.Main.DescriptionLong[Interaction];
+ UpdateLCD;
+ Light.LightOne(1, 200);
+end;
+
procedure TScreenMain.UpdateLCD;
begin
case Interaction of
diff --git a/Game/Code/Screens/UScreenName.pas b/Game/Code/Screens/UScreenName.pas
index e8bc2dd8..9819b994 100644
--- a/Game/Code/Screens/UScreenName.pas
+++ b/Game/Code/Screens/UScreenName.pas
@@ -76,17 +76,12 @@ var
begin
inherited Create;
- AddBackground(Theme.Name.Background.Tex);
+ LoadFromTheme(Theme.Name);
+
for I := 1 to 6 do
AddButton(Theme.Name.ButtonPlayer[I]);
- for I := 0 to High(Theme.Name.Static) do
- AddStatic(Theme.Name.Static[I]);
-
- for I := 0 to High(Theme.Name.Text) do
- AddText(Theme.Name.Text[I]);
-
Interaction := 0;
end;
diff --git a/Game/Code/Screens/UScreenOpen.pas b/Game/Code/Screens/UScreenOpen.pas
index 264f57a9..4f0c32c5 100644
--- a/Game/Code/Screens/UScreenOpen.pas
+++ b/Game/Code/Screens/UScreenOpen.pas
@@ -16,7 +16,7 @@ type
Path: string;
BackScreen: pointer;
procedure AddBox(X, Y, W, H: real);
- constructor Create(Back: String); override;
+ constructor Create; override;
procedure onShow; override;
function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override;
// function Draw: boolean; override;
@@ -90,9 +90,9 @@ begin
AddStatic(X+2, Y+2, W-4, H-4, 1, 1, 1, Skin.GetTextureFileName('Bar'), 'JPG', 'Font Black');
end;
-constructor TScreenOpen.Create(Back: String);
+constructor TScreenOpen.Create;
begin
- inherited Create(Back);
+ inherited Create;
// linijka
{ AddStatic(20, 10, 80, 30, 0, 0, 0, 'Bar', 'JPG', 'Font Black');
diff --git a/Game/Code/Screens/UScreenOptions.pas b/Game/Code/Screens/UScreenOptions.pas
index 0fffedac..f0229d8c 100644
--- a/Game/Code/Screens/UScreenOptions.pas
+++ b/Game/Code/Screens/UScreenOptions.pas
@@ -9,7 +9,7 @@ type
TScreenOptions = class(TMenu)
public
TextDescription: integer;
- constructor Create(Back: String); override;
+ constructor Create; override;
function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
procedure InteractNext; override;
@@ -80,88 +80,23 @@ begin
FadeTo(@ScreenMain);
end;
end;
- SDLK_LEFT:
- begin
- {case SelInteraction of
- 0: InteractCustom(+2);
- 1: InteractCustom(-1);
- 2: InteractCustom(-1);
- 3: InteractCustom(+2);
- 4: InteractCustom(-1);
- 5: InteractCustom(-1);
- end;}
- InteractPrev;
- end;
- SDLK_RIGHT:
- begin
- {case SelInteraction of
- 0: InteractCustom(+1);
- 1: InteractCustom(+1);
- 2: InteractCustom(-2);
- 3: InteractCustom(+1);
- 4: InteractCustom(+1);
- 5: InteractCustom(-2);
- end;}
- InteractNext;
- end;
- SDLK_UP:
- begin
- InteractPrev;
- {case SelInteraction of
- 0: InteractCustom(+3);
- 1: InteractCustom(+3);
- 2: InteractCustom(+3);
- 3: InteractCustom(-3);
- 4: InteractCustom(-3);
- 5: InteractCustom(-3);
- end; }
- end;
- SDLK_DOWN:
- begin
- {case SelInteraction of
- 0: InteractCustom(+3);
- 1: InteractCustom(+3);
- 2: InteractCustom(+3);
- 3: InteractCustom(-3);
- 4: InteractCustom(-3);
- 5: InteractCustom(-3);
- end; }
- InteractNext;
- end;
+ SDLK_DOWN: InteractInc;
+ SDLK_UP: InteractDec;
+ SDLK_RIGHT: InteractNext;
+ SDLK_LEFT: InteractPrev;
end;
end;
end;
-constructor TScreenOptions.Create(Back: String);
+constructor TScreenOptions.Create;
var
I: integer;
begin
- inherited Create(Back);
+ inherited Create;
- // Game
-{ AddButton(225, 100 + 0*60, 350, 50, Skin.Button, 'JPG', 'Transparent Range');
- AddButtonText(11, 10, 'Game');}
-
- // Graphics
-{ AddButton(225, 100 + 1*60, 350, 50, Skin.Button, 'JPG', 'Transparent Range');
- AddButtonText(11, 10, 'Graphics');
-
- // Sound
- AddButton(225, 100 + 2*60, 350, 50, Skin.Button, 'JPG', 'Transparent Range');
- AddButtonText(11, 10, 'Sound');
-
- // Lyrics
- AddButton(225, 100 + 3*60, 350, 50, Skin.Button, 'JPG', 'Transparent Range');
- AddButtonText(11, 10, 'Lyrics');
-
- // Themes
- AddButton(225, 100 + 4*60, 350, 50, Skin.Button, 'JPG', 'Transparent Range');
- AddButtonText(11, 10, 'Themes');
-
- // Exit
- AddButton(225, 100 + 6*60, 350, 50, Skin.Exit);}
+ TextDescription := AddText(Theme.Options.TextDescription);
- AddBackground(Theme.Options.Background.Tex);
+ LoadFromTheme(Theme.Options);
AddButton(Theme.Options.ButtonGame);
if (Length(Button[0].Text)=0) then
@@ -195,14 +130,6 @@ begin
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]);
-
- for I := 0 to High(Theme.Options.Text) do
- AddText(Theme.Options.Text[I]);
-
- TextDescription := AddText(Theme.Options.TextDescription);
-
Interaction := 0;
end;
diff --git a/Game/Code/Screens/UScreenOptionsAdvanced.pas b/Game/Code/Screens/UScreenOptionsAdvanced.pas
index ed3bc164..256b02db 100644
--- a/Game/Code/Screens/UScreenOptionsAdvanced.pas
+++ b/Game/Code/Screens/UScreenOptionsAdvanced.pas
@@ -8,7 +8,7 @@ uses
type
TScreenOptionsAdvanced = class(TMenu)
public
- constructor Create(Back: String); override;
+ constructor Create; override;
function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
end;
@@ -59,19 +59,13 @@ begin
end;
end;
-constructor TScreenOptionsAdvanced.Create(Back: String);
+constructor TScreenOptionsAdvanced.Create;
var
I: integer;
begin
- inherited Create(Back);
+ inherited Create;
- 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]);
+ LoadFromTheme(Theme.OptionsAdvanced);
AddSelect(Theme.OptionsAdvanced.SelectLoadAnimation, Ini.LoadAnimation, ILoadAnimation);
AddSelect(Theme.OptionsAdvanced.SelectScreenFade, Ini.ScreenFade, IScreenFade);
diff --git a/Game/Code/Screens/UScreenOptionsGame.pas b/Game/Code/Screens/UScreenOptionsGame.pas
index 63bbec36..88bb34e3 100644
--- a/Game/Code/Screens/UScreenOptionsGame.pas
+++ b/Game/Code/Screens/UScreenOptionsGame.pas
@@ -9,7 +9,7 @@ type
TScreenOptionsGame = class(TMenu)
public
old_Tabs, old_Sorting: integer;
- constructor Create(Back: String); override;
+ constructor Create; override;
function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
procedure RefreshSongs;
@@ -61,19 +61,13 @@ begin
end;
end;
-constructor TScreenOptionsGame.Create(Back: String);
+constructor TScreenOptionsGame.Create;
var
I: integer;
begin
- inherited Create(Back);
+ inherited Create;
- AddBackground(Theme.OptionsGame.Background.Tex);
-
- for I := 0 to High(Theme.OptionsGame.Static) do
- AddStatic(Theme.OptionsGame.Static[I]);
-
- for I := 0 to High(Theme.OptionsGame.Text) do
- AddText(Theme.OptionsGame.Text[I]);
+ LoadFromTheme(Theme.OptionsGame);
//Refresh Songs Patch
old_Sorting := Ini.Sorting;
diff --git a/Game/Code/Screens/UScreenOptionsGraphics.pas b/Game/Code/Screens/UScreenOptionsGraphics.pas
index 6152c9c0..b36bb7d3 100644
--- a/Game/Code/Screens/UScreenOptionsGraphics.pas
+++ b/Game/Code/Screens/UScreenOptionsGraphics.pas
@@ -8,7 +8,7 @@ uses
type
TScreenOptionsGraphics = class(TMenu)
public
- constructor Create(Back: String); override;
+ constructor Create; override;
function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
end;
@@ -66,19 +66,13 @@ begin
end;
end;
-constructor TScreenOptionsGraphics.Create(Back: String);
+constructor TScreenOptionsGraphics.Create;
var
I: integer;
begin
- inherited Create(Back);
+ inherited Create;
- AddBackground(Theme.OptionsGraphics.Background.Tex);
-
- for I := 0 to High(Theme.OptionsGraphics.Static) do
- AddStatic(Theme.OptionsGraphics.Static[I]);
-
- for I := 0 to High(Theme.OptionsGraphics.Text) do
- AddText(Theme.OptionsGraphics.Text[I]);
+ LoadFromTheme(Theme.OptionsGraphics);
AddSelectSlide(Theme.OptionsGraphics.SelectSlideResolution, Ini.Resolution, IResolution);
AddSelect(Theme.OptionsGraphics.SelectFullscreen, Ini.Fullscreen, IFullscreen);
diff --git a/Game/Code/Screens/UScreenOptionsLyrics.pas b/Game/Code/Screens/UScreenOptionsLyrics.pas
index 35cb2415..ff03b2ba 100644
--- a/Game/Code/Screens/UScreenOptionsLyrics.pas
+++ b/Game/Code/Screens/UScreenOptionsLyrics.pas
@@ -8,7 +8,7 @@ uses
type
TScreenOptionsLyrics = class(TMenu)
public
- constructor Create(Back: String); override;
+ constructor Create; override;
function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
end;
@@ -59,19 +59,13 @@ begin
end;
end;
-constructor TScreenOptionsLyrics.Create(Back: String);
+constructor TScreenOptionsLyrics.Create;
var
I: integer;
begin
- inherited Create(Back);
+ inherited Create;
- AddBackground(Theme.OptionsLyrics.Background.Tex);
-
- for I := 0 to High(Theme.OptionsLyrics.Static) do
- AddStatic(Theme.OptionsLyrics.Static[I]);
-
- for I := 0 to High(Theme.OptionsLyrics.Text) do
- AddText(Theme.OptionsLyrics.Text[I]);
+ LoadFromTheme(Theme.OptionsLyrics);
AddSelect(Theme.OptionsLyrics.SelectLyricsFont, Ini.LyricsFont, ILyricsFont);
AddSelect(Theme.OptionsLyrics.SelectLyricsEffect, Ini.LyricsEffect, ILyricsEffect);
diff --git a/Game/Code/Screens/UScreenOptionsRecord.pas b/Game/Code/Screens/UScreenOptionsRecord.pas
index 1d09d0b8..af7d2cd6 100644
--- a/Game/Code/Screens/UScreenOptionsRecord.pas
+++ b/Game/Code/Screens/UScreenOptionsRecord.pas
@@ -74,20 +74,8 @@ var
begin
inherited Create;
- AddBackground(Theme.OptionsRecord.Background.Tex);
- for I := 0 to High(Theme.OptionsRecord.Static) do
- AddStatic(Theme.OptionsRecord.Static[I]);
+ LoadFromTheme(Theme.OptionsRecord);
- for I := 0 to High(Theme.OptionsRecord.Text) do
- AddText(Theme.OptionsRecord.Text[I]);
-
-// SetLength(ICard, 0);
-// ICard[0] := 'karta';
-
-// SetLength(IInput, 0);
-// IInput[0] := 'wejscie';
-
-// if Length(Recording.SoundCard) > 0 then begin
SetLength(ICard, Length(Recording.SoundCard));
for SC := 0 to High(Recording.SoundCard) do
ICard[SC] := Recording.SoundCard[SC].Description;
diff --git a/Game/Code/Screens/UScreenOptionsSound.pas b/Game/Code/Screens/UScreenOptionsSound.pas
index aea6cdbc..ee53ef02 100644
--- a/Game/Code/Screens/UScreenOptionsSound.pas
+++ b/Game/Code/Screens/UScreenOptionsSound.pas
@@ -8,7 +8,7 @@ uses
type
TScreenOptionsSound = class(TMenu)
public
- constructor Create(Back: String); override;
+ constructor Create; override;
function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
end;
@@ -59,25 +59,18 @@ begin
end;
end;
-constructor TScreenOptionsSound.Create(Back: String);
+constructor TScreenOptionsSound.Create;
var
I: integer;
begin
- inherited Create(Back);
+ inherited Create;
- AddBackground(Theme.OptionsSound.Background.Tex);
-
- for I := 0 to High(Theme.OptionsSound.Static) do
- AddStatic(Theme.OptionsSound.Static[I]);
-
- for I := 0 to High(Theme.OptionsSound.Text) do
- AddText(Theme.OptionsSound.Text[I]);
+ LoadFromTheme(Theme.OptionsSound);
AddSelect(Theme.OptionsSound.SelectMicBoost, Ini.MicBoost, IMicBoost);
AddSelect(Theme.OptionsSound.SelectClickAssist, Ini.ClickAssist, IClickAssist);
AddSelect(Theme.OptionsSound.SelectBeatClick, Ini.BeatClick, IBeatClick);
AddSelect(Theme.OptionsSound.SelectThreshold, Ini.Threshold, IThreshold);
- //AddSelect(Theme.OptionsSound.SelectTwoPlayerMode, Ini.TwoPlayerMode, ITwoPlayerMode);
AddButton(Theme.OptionsSound.ButtonExit);
if (Length(Button[0].Text)=0) then
diff --git a/Game/Code/Screens/UScreenOptionsThemes.pas b/Game/Code/Screens/UScreenOptionsThemes.pas
index 151913be..c0bf2e15 100644
--- a/Game/Code/Screens/UScreenOptionsThemes.pas
+++ b/Game/Code/Screens/UScreenOptionsThemes.pas
@@ -9,7 +9,7 @@ type
TScreenOptionsThemes = class(TMenu)
public
SkinSelect: Integer;
- constructor Create(Back: String); override;
+ constructor Create; override;
function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
procedure InteractInc; override;
@@ -84,19 +84,13 @@ begin
end;
end;
-constructor TScreenOptionsThemes.Create(Back: String);
+constructor TScreenOptionsThemes.Create;
var
I: integer;
begin
- inherited Create(Back);
+ inherited Create;
- AddBackground(Theme.OptionsThemes.Background.Tex);
-
- for I := 0 to High(Theme.OptionsThemes.Static) do
- AddStatic(Theme.OptionsThemes.Static[I]);
-
- for I := 0 to High(Theme.OptionsThemes.Text) do
- AddText(Theme.OptionsThemes.Text[I]);
+ LoadFromTheme(Theme.OptionsThemes);
AddSelectSlide(Theme.OptionsThemes.SelectTheme, Ini.Theme, ITheme);
diff --git a/Game/Code/Screens/UScreenPartyNewRound.pas b/Game/Code/Screens/UScreenPartyNewRound.pas
index b268e04f..cf643310 100644
--- a/Game/Code/Screens/UScreenPartyNewRound.pas
+++ b/Game/Code/Screens/UScreenPartyNewRound.pas
@@ -116,9 +116,6 @@ var
begin
inherited Create;
- AddBackground(Theme.PartyNewRound.Background.Tex);
- Log.LogError(Theme.PartyNewRound.Background.Tex);
-
TextRound1 := AddText (Theme.PartyNewRound.TextRound1);
TextRound2 := AddText (Theme.PartyNewRound.TextRound2);
TextRound3 := AddText (Theme.PartyNewRound.TextRound3);
@@ -161,15 +158,7 @@ begin
StaticTeam2 := AddStatic (Theme.PartyNewRound.StaticTeam2);
StaticTeam3 := AddStatic (Theme.PartyNewRound.StaticTeam3);
- AddButton (Theme.PartyNewRound.ButtonNext);
-
- for I := 0 to High(Theme.PartyNewRound.Static) do
- AddStatic(Theme.PartyNewRound.Static[I]);
-
- for I := 0 to High(Theme.PartyNewRound.Text) do
- AddText(Theme.PartyNewRound.Text[I]);
-
- Interaction := 0;
+ LoadFromTheme(Theme.PartyNewRound);
end;
procedure TScreenPartyNewRound.onShow;
diff --git a/Game/Code/Screens/UScreenPartyOptions.pas b/Game/Code/Screens/UScreenPartyOptions.pas
index fd7b5107..f0df9871 100644
--- a/Game/Code/Screens/UScreenPartyOptions.pas
+++ b/Game/Code/Screens/UScreenPartyOptions.pas
@@ -45,37 +45,6 @@ uses UGraphic, UMain, UIni, UTexture, ULanguage, UParty, UDLLManager, UPlaylist,
function TScreenPartyOptions.ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean;
var
I, J: Integer;
-
- function IsVisible: Boolean;
- begin
- Result := True;
- if (Interactions[Interaction].Typ = 0) then
- begin
- Result := Button[Interactions[Interaction].Num].Visible;
- end
- else if (Interactions[Interaction].Typ = 1) then
- begin
- //Result := Selects[Interactions[Interaction].Num].Visible;
- end
- else if (Interactions[Interaction].Typ = 3) then
- begin
- Result := SelectsS[Interactions[Interaction].Num].Visible;
- end;
- end;
-
- Procedure SelectNext;
- begin
- repeat
- InteractNext;
- until IsVisible;
- end;
-
- Procedure SelectPrev;
- begin
- repeat
- InteractPrev;
- until IsVisible;
- end;
begin
Result := true;
If (PressedDown) Then
@@ -137,8 +106,8 @@ begin
// Up and Down could be done at the same time,
// but I don't want to declare variables inside
// functions like this one, called so many times
- SDLK_DOWN: SelectNext;
- SDLK_UP: SelectPrev;
+ SDLK_DOWN: InteractNext;
+ SDLK_UP: InteractPrev;
SDLK_RIGHT:
begin
Music.PlayOption;
@@ -193,6 +162,7 @@ begin
SetLength(IPlaylist2, 1);
IPlaylist2[0] := '---';
+ //Clear all Selects
NumTeams := 0;
NumPlayer1 := 0;
NumPlayer2 := 0;
@@ -201,7 +171,8 @@ begin
PlayList := 0;
PlayList2 := 0;
- AddBackground(Theme.PartyOptions.Background.Tex);
+ //Load Screen From Theme
+ LoadFromTheme(Theme.PartyOptions);
SelectLevel := AddSelectSlide (Theme.PartyOptions.SelectLevel, Ini.Difficulty, Theme.ILevel);
SelectPlayList := AddSelectSlide (Theme.PartyOptions.SelectPlayList, PlayList, IPlaylist);
@@ -212,12 +183,6 @@ begin
SelectPlayers2 := AddSelectSlide (Theme.PartyOptions.SelectPlayers2, NumPlayer2, IPlayers);
SelectPlayers3 := AddSelectSlide (Theme.PartyOptions.SelectPlayers3, NumPlayer3, IPlayers);
- for I := 0 to High(Theme.PartyOptions.Static) do
- AddStatic(Theme.PartyOptions.Static[I]);
-
- for I := 0 to High(Theme.PartyOptions.Text) do
- AddText(Theme.PartyOptions.Text[I]);
-
Interaction := 0;
//Hide Team3 Players
diff --git a/Game/Code/Screens/UScreenPartyPlayer.pas b/Game/Code/Screens/UScreenPartyPlayer.pas
index 02f87710..d6e13d65 100644
--- a/Game/Code/Screens/UScreenPartyPlayer.pas
+++ b/Game/Code/Screens/UScreenPartyPlayer.pas
@@ -108,7 +108,7 @@ var
begin
inherited Create;
- AddBackground(Theme.PartyPlayer.Background.Tex);
+ LoadFromTheme(Theme.PartyPlayer);
Team1Name := AddButton(Theme.PartyPlayer.Team1Name);
AddButton(Theme.PartyPlayer.Player1Name);
@@ -128,12 +128,6 @@ begin
AddButton(Theme.PartyPlayer.Player11Name);
AddButton(Theme.PartyPlayer.Player12Name);
- for I := 0 to High(Theme.PartyPlayer.Static) do
- AddStatic(Theme.PartyPlayer.Static[I]);
-
- for I := 0 to High(Theme.PartyPlayer.Text) do
- AddText(Theme.PartyPlayer.Text[I]);
-
Interaction := 0;
end;
diff --git a/Game/Code/Screens/UScreenPartyScore.pas b/Game/Code/Screens/UScreenPartyScore.pas
index 142ec947..805525a1 100644
--- a/Game/Code/Screens/UScreenPartyScore.pas
+++ b/Game/Code/Screens/UScreenPartyScore.pas
@@ -72,8 +72,6 @@ var
begin
inherited Create;
- AddBackground(Theme.PartyScore.Background.Tex);
-
TextScoreTeam1 := AddText (Theme.PartyScore.TextScoreTeam1);
TextScoreTeam2 := AddText (Theme.PartyScore.TextScoreTeam2);
TextScoreTeam3 := AddText (Theme.PartyScore.TextScoreTeam3);
@@ -87,11 +85,7 @@ begin
TextWinner := AddText (Theme.PartyScore.TextWinner);
- for I := 0 to High(Theme.PartyScore.Static) do
- AddStatic(Theme.PartyScore.Static[I]);
-
- for I := 0 to High(Theme.PartyScore.Text) do
- AddText(Theme.PartyScore.Text[I]);
+ LoadFromTheme(Theme.PartyScore);
end;
procedure TScreenPartyScore.onShow;
diff --git a/Game/Code/Screens/UScreenPartyWin.pas b/Game/Code/Screens/UScreenPartyWin.pas
index ac5f38d9..ff65e82f 100644
--- a/Game/Code/Screens/UScreenPartyWin.pas
+++ b/Game/Code/Screens/UScreenPartyWin.pas
@@ -61,8 +61,6 @@ var
begin
inherited Create;
- AddBackground(Theme.PartyWin.Background.Tex);
-
TextScoreTeam1 := AddText (Theme.PartyWin.TextScoreTeam1);
TextScoreTeam2 := AddText (Theme.PartyWin.TextScoreTeam2);
TextScoreTeam3 := AddText (Theme.PartyWin.TextScoreTeam3);
@@ -76,11 +74,7 @@ begin
TextWinner := AddText (Theme.PartyWin.TextWinner);
- for I := 0 to High(Theme.PartyWin.Static) do
- AddStatic(Theme.PartyWin.Static[I]);
-
- for I := 0 to High(Theme.PartyWin.Text) do
- AddText(Theme.PartyWin.Text[I]);
+ LoadFromTheme(Theme.PartyWin);
end;
procedure TScreenPartyWin.onShow;
diff --git a/Game/Code/Screens/UScreenScore.pas b/Game/Code/Screens/UScreenScore.pas
index 72c42cb8..af1ccb59 100644
--- a/Game/Code/Screens/UScreenScore.pas
+++ b/Game/Code/Screens/UScreenScore.pas
@@ -40,7 +40,7 @@ type
Animation: real;
Fadeout: boolean;
- constructor Create(Back: String); override;
+ constructor Create; override;
function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
function Draw: boolean; override;
@@ -92,60 +92,14 @@ begin
end;
end;
-constructor TScreenScore.Create(Back: String);
+constructor TScreenScore.Create;
var
P: integer;
I, C: integer;
begin
- inherited Create(Back);
+ inherited Create;
- // background arrows sorted from farthest to nearest
-{ AddStatic(-2000 + 400, 100, 360, 60, 1, 1, 1, Skin.Arrow2, 'JPG', 'Arrow');
- AddStatic(-2000 + -50, 200, 420, 70, 1, 1, 1, Skin.Arrow, 'JPG', 'Arrow');
- AddStatic(-2000 + 90, 30, 500, 90, 1, 1, 1, Skin.Arrow, 'JPG', 'Arrow');
- AddStatic(-2000 + -250, 100, 800, 150, 1, 1, 1, Skin.Arrow, 'JPG', 'Arrow');
-
- Static[0].Texture.Rot := 100 * pi/180;
- Static[1].Texture.Rot := 7 * pi/180;
- Static[2].Texture.Rot := 35 * pi/180;
-
-
- // main arrow with text
- AddStatic(0, 340, 1000, 180, 1, 1, 1, Skin.Arrow2, 'JPG', 'Arrow');
-// AddText(450, 409, 4, 15, 1, 1, 1, 'Smile');
- AddText(450, 409, 4, 15, 1, 1, 1, 'Let''s see the results');
- Text[0].Y := 401;
-
- Static[4].Texture.Rot := -3 * pi/180;
-
-
- // two mid arrows
- AddStatic(-2000 + -250, 100, 800, 150, 1, 1, 1, Skin.Arrow, 'JPG', 'Arrow');
- AddStatic(-2000 + -250, 100, 800, 150, 1, 1, 1, Skin.Arrow, 'JPG', 'Arrow');
-
-
- // last arrow
- AddStatic(-2000, 340, 1100, 180, 1, 1, 1, Skin.Arrow2, 'JPG', 'Arrow');
-// AddText(-2000, 407, 4, 17, 1, 1, 1, 'SHUFFLE !');
- AddText(-2000, 407, 4, 15, 1, 1, 1, 'SHUFFLE !');
-
- Static[7].Texture.Rot := 184 * pi/180;
-
- // score text
- AddText(-2000, 407, 4, 17, 1, 1, 1, '10010 points');
- AddText(-2000, 407, 4, 17, 1, 1, 1, 'Cheater');
-
- Fadeout := false;}
-
-
- // Singstar Theme
- AddBackground(Theme.Score.Background.Tex);
-
- for I := 0 to High(Theme.Score.Static) do
- AddStatic(Theme.Score.Static[I]);
-
- for I := 0 to High(Theme.Score.Text) do
- AddText(Theme.Score.Text[I]);
+ LoadFromTheme(Theme.Score);
TextArtist := AddText(Theme.Score.TextArtist);
TextTitle := AddText(Theme.Score.TextTitle);
diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas
index cca398a1..93c3ac48 100644
--- a/Game/Code/Screens/UScreenSing.pas
+++ b/Game/Code/Screens/UScreenSing.pas
@@ -163,13 +163,7 @@ var
begin
inherited Create;
- AddBackground(Theme.Sing.Background.Tex);
-
- for I := 0 to High(Theme.Sing.Static) do
- AddStatic(Theme.Sing.Static[I]);
-
- for I := 0 to High(Theme.Sing.Text) do
- AddText(Theme.Sing.Text[I]);
+ LoadFromTheme(Theme.Sing);
// time
TextTime := AddText(75, 14, 1, 8, 0.25, 0.25, 0.25, '00:00');
diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas
index 16ac46ab..5c383168 100644
--- a/Game/Code/Screens/UScreenSong.pas
+++ b/Game/Code/Screens/UScreenSong.pas
@@ -630,13 +630,7 @@ begin
// AddStatic(200, 10, 400, 90, Skin.SelectSong);
// AddStatic(200-10, 140-5, 400+20, 50+10, Skin.Selection, 'JPG', 'Font Gray');
- AddBackground(Theme.Song.Background.Tex);
-
- for I := 0 to High(Theme.Song.Static) do
- AddStatic(Theme.Song.Static[I]);
-
- for I := 0 to High(Theme.Song.Text) do
- AddText(Theme.Song.Text[I]);
+ LoadFromTheme(Theme.Song);
TextArtist := AddText(Theme.Song.TextArtist);
TextTitle := AddText(Theme.Song.TextTitle);
diff --git a/Game/Code/Screens/UScreenSongJumpto.pas b/Game/Code/Screens/UScreenSongJumpto.pas
index 123146c7..b90c558b 100644
--- a/Game/Code/Screens/UScreenSongJumpto.pas
+++ b/Game/Code/Screens/UScreenSongJumpto.pas
@@ -154,7 +154,9 @@ var
begin
inherited Create;
- AddBackground(Theme.SongJumpto.Background.Tex);
+ AddText(Theme.SongJumpto.TextFound);
+
+ LoadFromTheme(Theme.SongJumpto);
AddButton(Theme.SongJumpto.ButtonSearchText);
if (Length(Button[0].Text) = 0) then
@@ -163,13 +165,6 @@ begin
SelectType := 0;
AddSelectSlide(Theme.SongJumpto.SelectSlideType, SelectType, Theme.SongJumpto.IType);
- AddText(Theme.SongJumpto.TextFound);
-
- for I := 0 to High(Theme.SongJumpto.Static) do
- AddStatic(Theme.SongJumpto.Static[I]);
-
- for I := 0 to High(Theme.SongJumpto.Text) do
- AddText(Theme.SongJumpto.Text[I]);
Interaction := 0;
LastPlayed := 0;
diff --git a/Game/Code/Screens/UScreenSongMenu.pas b/Game/Code/Screens/UScreenSongMenu.pas
index d4ad8016..fd875527 100644
--- a/Game/Code/Screens/UScreenSongMenu.pas
+++ b/Game/Code/Screens/UScreenSongMenu.pas
@@ -45,36 +45,6 @@ implementation
uses UGraphic, UMain, UIni, UTexture, ULanguage, UParty, UPlaylist;
function TScreenSongMenu.ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean;
- function IsVisible: Boolean;
- begin
- Result := True;
- if (Interactions[Interaction].Typ = 0) then
- begin
- Result := Button[Interactions[Interaction].Num].Visible;
- end
- else if (Interactions[Interaction].Typ = 1) then
- begin
- //Result := Selects[Interactions[Interaction].Num].Visible;
- end
- else if (Interactions[Interaction].Typ = 3) then
- begin
- Result := SelectsS[Interactions[Interaction].Num].Visible;
- end;
- end;
-
- Procedure SelectNext;
- begin
- repeat
- InteractNext;
- until IsVisible;
- end;
-
- Procedure SelectPrev;
- begin
- repeat
- InteractPrev;
- until IsVisible;
- end;
begin
Result := true;
If (PressedDown) Then
@@ -113,8 +83,8 @@ begin
HandleReturn;
end;
- SDLK_DOWN: SelectNext;
- SDLK_UP: SelectPrev;
+ SDLK_DOWN: InteractNext;
+ SDLK_UP: InteractPrev;
SDLK_RIGHT:
begin
@@ -141,10 +111,15 @@ var
I: integer;
begin
inherited Create;
+
+ //Create Dummy SelectSlide Entrys
SetLength(ISelections, 1);
ISelections[0] := 'Dummy';
- AddBackground(Theme.SongMenu.Background.Tex);
+
+ AddText(Theme.SongMenu.TextMenu);
+
+ LoadFromTheme(Theme.SongMenu);
AddButton(Theme.SongMenu.Button1);
if (Length(Button[0].Text) = 0) then
@@ -164,13 +139,6 @@ begin
if (Length(Button[3].Text) = 0) then
AddButtonText(14, 20, 'Button 4');
- AddText(Theme.SongMenu.TextMenu);
-
- for I := 0 to High(Theme.SongMenu.Static) do
- AddStatic(Theme.SongMenu.Static[I]);
-
- for I := 0 to High(Theme.SongMenu.Text) do
- AddText(Theme.SongMenu.Text[I]);
Interaction := 0;
end;
diff --git a/Game/Code/Screens/UScreenStatDetail.pas b/Game/Code/Screens/UScreenStatDetail.pas
index dc4a0f1f..1461a9da 100644
--- a/Game/Code/Screens/UScreenStatDetail.pas
+++ b/Game/Code/Screens/UScreenStatDetail.pas
@@ -102,7 +102,15 @@ var
begin
inherited Create;
- AddBackground(Theme.StatDetail.Background.Tex);
+ for I := 0 to High(Theme.StatDetail.TextList) do
+ AddText(Theme.StatDetail.TextList[I]);
+
+ Count := Length(Theme.StatDetail.TextList);
+
+ AddText(Theme.StatDetail.TextDescription);
+ AddText(Theme.StatDetail.TextPage);
+
+ LoadFromTheme(Theme.StatDetail);
AddButton(Theme.StatDetail.ButtonNext);
if (Length(Button[0].Text)=0) then
@@ -120,22 +128,6 @@ begin
if (Length(Button[3].Text)=0) then
AddButtonText(14, 20, Theme.Options.Description[7]);
- for I := 0 to High(Theme.StatDetail.TextList) do
- AddText(Theme.StatDetail.TextList[I]);
-
- Count := Length(Theme.StatDetail.TextList);
-
- AddText(Theme.StatDetail.TextDescription);
- AddText(Theme.StatDetail.TextPage);
-
- for I := 0 to High(Theme.StatDetail.Static) do
- AddStatic(Theme.StatDetail.Static[I]);
-
- for I := 0 to High(Theme.StatDetail.Text) do
- AddText(Theme.StatDetail.Text[I]);
-
-
-
Interaction := 0;
Typ := 0;
end;
diff --git a/Game/Code/Screens/UScreenStatMain.pas b/Game/Code/Screens/UScreenStatMain.pas
index 337ed745..219ccd57 100644
--- a/Game/Code/Screens/UScreenStatMain.pas
+++ b/Game/Code/Screens/UScreenStatMain.pas
@@ -80,7 +80,9 @@ var
begin
inherited Create;
- AddBackground(Theme.StatMain.Background.Tex);
+ TextOverview := AddText(Theme.StatMain.TextOverview);
+
+ LoadFromTheme(Theme.StatMain);
AddButton(Theme.StatMain.ButtonScores);
if (Length(Button[0].Text)=0) then
@@ -102,16 +104,9 @@ begin
if (Length(Button[4].Text)=0) then
AddButtonText(14, 20, Theme.Options.Description[4]);
- TextOverview := AddText(Theme.StatMain.TextOverview);
-
- for I := 0 to High(Theme.StatMain.Static) do
- AddStatic(Theme.StatMain.Static[I]);
-
- for I := 0 to High(Theme.StatMain.Text) do
- AddText(Theme.StatMain.Text[I]);
-
Interaction := 0;
+ //Set Songs with Vid
SongswithVid := 0;
For I := 0 to high(Songs.Song) do
if (Songs.Song[I].Video <> '') AND FileExists(Songs.Song[I].Path + Songs.Song[I].Video) then
diff --git a/Game/Code/Screens/UScreenTop5.pas b/Game/Code/Screens/UScreenTop5.pas
index 94f3de1e..4d542bf0 100644
--- a/Game/Code/Screens/UScreenTop5.pas
+++ b/Game/Code/Screens/UScreenTop5.pas
@@ -58,13 +58,7 @@ var
begin
inherited Create;
- AddBackground(Theme.Top5.Background.Tex);
-
- for I := 0 to High(Theme.Top5.Static) do
- AddStatic(Theme.Top5.Static[I]);
-
- for I := 0 to High(Theme.Top5.Text) do
- AddText(Theme.Top5.Text[I]);
+ LoadFromTheme(Theme.Top5);
TextLevel := AddText(Theme.Top5.TextLevel);