aboutsummaryrefslogtreecommitdiffstats
path: root/Game
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-05-17 10:33:27 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-05-17 10:33:27 +0000
commitf11d9806f4623dc4dbf14e521624109b7a69b86b (patch)
tree2b7c032077fb900ef5e1d2c5c1311e244a17cf23 /Game
parentc07c700247d4c70f79d2f7fb9c5b368196d1cf53 (diff)
downloadusdx-f11d9806f4623dc4dbf14e521624109b7a69b86b.tar.gz
usdx-f11d9806f4623dc4dbf14e521624109b7a69b86b.tar.xz
usdx-f11d9806f4623dc4dbf14e521624109b7a69b86b.zip
Deleted Motas Methods to display variable Statics and Texts in Party Mode.
Added a new, more extendable and easier in Code Method for displaying Statics in Party Mode or in Normal Mode only Enter in Songscreen in Party Mode Opens now SongMenu again when PartyPopup=1 Changed Theme to Fit these changes git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@206 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/UThemes.pas89
-rw-r--r--Game/Code/Screens/UScreenSong.pas222
2 files changed, 62 insertions, 249 deletions
diff --git a/Game/Code/Classes/UThemes.pas b/Game/Code/Classes/UThemes.pas
index 24ac0eaa..0fe207e9 100644
--- a/Game/Code/Classes/UThemes.pas
+++ b/Game/Code/Classes/UThemes.pas
@@ -280,6 +280,13 @@ type
ColR, ColG, ColB: Real;
end;
+ //Party and Non Party specific Statics and Texts
+ StaticParty: AThemeStatic;
+ TextParty: AThemeText;
+
+ StaticNonParty: AThemeStatic;
+ TextNonParty: AThemeText;
+
//Party Mode
StaticTeam1Joker1: TThemeStatic;
StaticTeam1Joker2: TThemeStatic;
@@ -296,41 +303,6 @@ type
StaticTeam3Joker3: TThemeStatic;
StaticTeam3Joker4: TThemeStatic;
StaticTeam3Joker5: TThemeStatic;
-
- StaticKeys1 : TThemeStatic;
- TextKeys1 : TThemeText;
- StaticKeys1Party : TThemeStatic;
- TextKeys1Party : TThemeText;
- StaticKeys2 : TThemeStatic;
- TextKeys2 : TThemeText;
- StaticKeys2Party : TThemeStatic;
- TextKeys2Party : TThemeText;
- StaticKeys3 : TThemeStatic;
- TextKeys3 : TThemeText;
- StaticKeys3Party : TThemeStatic;
- TextKeys3Party : TThemeText;
- StaticKeys4 : TThemeStatic;
- TextKeys4 : TThemeText;
- StaticKeys4Party : TThemeStatic;
- TextKeys4Party : TThemeText;
- StaticKeys5 : TThemeStatic;
- TextKeys5 : TThemeText;
- StaticKeys5Party : TThemeStatic;
- TextKeys5Party : TThemeText;
- StaticKeys6 : TThemeStatic;
- TextKeys6 : TThemeText;
- StaticKeys6Party : TThemeStatic;
- TextKeys6Party : TThemeText;
- StaticKeys7 : TThemeStatic;
- TextKeys7 : TThemeText;
- StaticKeys7Party : TThemeStatic;
- TextKeys7Party : TThemeText;
- StaticKeys8 : TThemeStatic;
- TextKeys8 : TThemeText;
- StaticKeys8Party : TThemeStatic;
- TextKeys8Party : TThemeText;
-
-
end;
TThemeSing = class(TThemeBasic)
@@ -1022,6 +994,13 @@ begin
end;
//Load Equalizer Pos and Size from Theme Mod End
+ //Party and Non Party specific Statics and Texts
+ ThemeLoadStatics (Song.StaticParty, 'SongStaticParty');
+ ThemeLoadTexts (Song.TextParty, 'SongTextParty');
+
+ ThemeLoadStatics (Song.StaticNonParty, 'SongStaticNonParty');
+ ThemeLoadTexts (Song.TextNonParty, 'SongTextNonParty');
+
//Party Mode
ThemeLoadStatic(Song.StaticTeam1Joker1, 'SongStaticTeam1Joker1');
ThemeLoadStatic(Song.StaticTeam1Joker2, 'SongStaticTeam1Joker2');
@@ -1041,46 +1020,6 @@ begin
ThemeLoadStatic(Song.StaticTeam3Joker4, 'SongStaticTeam3Joker4');
ThemeLoadStatic(Song.StaticTeam3Joker5, 'SongStaticTeam3Joker5');
- ThemeLoadStatic(Song.StaticKeys1, 'SongStaticKeys1');
- ThemeLoadText(Song.TextKeys1, 'SongStaticKeys1Text');
- ThemeLoadStatic(Song.StaticKeys1Party, 'SongStaticKeys1Party');
- ThemeLoadText(Song.TextKeys1Party, 'SongStaticKeys1TextParty');
-
- ThemeLoadStatic(Song.StaticKeys2, 'SongStaticKeys2');
- ThemeLoadText(Song.TextKeys2, 'SongStaticKeys2Text');
- ThemeLoadStatic(Song.StaticKeys2Party, 'SongStaticKeys2Party');
- ThemeLoadText(Song.TextKeys2Party, 'SongStaticKeys2TextParty');
-
- ThemeLoadStatic(Song.StaticKeys3, 'SongStaticKeys3');
- ThemeLoadText(Song.TextKeys3, 'SongStaticKeys3Text');
- ThemeLoadStatic(Song.StaticKeys3Party, 'SongStaticKeys3Party');
- ThemeLoadText(Song.TextKeys3Party, 'SongStaticKeys3TextParty');
-
- ThemeLoadStatic(Song.StaticKeys4, 'SongStaticKeys4');
- ThemeLoadText(Song.TextKeys4, 'SongStaticKeys4Text');
- ThemeLoadStatic(Song.StaticKeys4Party, 'SongStaticKeys4Party');
- ThemeLoadText(Song.TextKeys4Party, 'SongStaticKeys4TextParty');
-
- ThemeLoadStatic(Song.StaticKeys5, 'SongStaticKeys5');
- ThemeLoadText(Song.TextKeys5, 'SongStaticKeys5Text');
- ThemeLoadStatic(Song.StaticKeys5Party, 'SongStaticKeys5Party');
- ThemeLoadText(Song.TextKeys5Party, 'SongStaticKeys5TextParty');
-
- ThemeLoadStatic(Song.StaticKeys6, 'SongStaticKeys6');
- ThemeLoadText(Song.TextKeys6, 'SongStaticKeys6Text');
- ThemeLoadStatic(Song.StaticKeys6Party, 'SongStaticKeys6Party');
- ThemeLoadText(Song.TextKeys6Party, 'SongStaticKeys6TextParty');
-
- ThemeLoadStatic(Song.StaticKeys7, 'SongStaticKeys7');
- ThemeLoadText(Song.TextKeys7, 'SongStaticKeys7Text');
- ThemeLoadStatic(Song.StaticKeys7Party, 'SongStaticKeys7Party');
- ThemeLoadText(Song.TextKeys7Party, 'SongStaticKeys7TextParty');
-
- ThemeLoadStatic(Song.StaticKeys8, 'SongStaticKeys8');
- ThemeLoadText(Song.TextKeys8, 'SongStaticKeys8Text');
- ThemeLoadStatic(Song.StaticKeys8Party, 'SongStaticKeys8Party');
- ThemeLoadText(Song.TextKeys8Party, 'SongStaticKeys8TextParty');
-
// Sing
ThemeLoadBasic(Sing, 'Sing');
diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas
index 26fcba2e..95550a32 100644
--- a/Game/Code/Screens/UScreenSong.pas
+++ b/Game/Code/Screens/UScreenSong.pas
@@ -53,45 +53,10 @@ type
StaticTeam3Joker4: Cardinal;
StaticTeam3Joker5: Cardinal;
- StaticKeys1: Cardinal;
- TextKeys1: integer;
- StaticKeys1Party: Cardinal;
- TextKeys1Party: integer;
-
- StaticKeys2: Cardinal;
- TextKeys2: integer;
- StaticKeys2Party: Cardinal;
- TextKeys2Party: integer;
-
- StaticKeys3: Cardinal;
- TextKeys3: integer;
- StaticKeys3Party: Cardinal;
- TextKeys3Party: integer;
-
- StaticKeys4: Cardinal;
- TextKeys4: integer;
- StaticKeys4Party: Cardinal;
- TextKeys4Party: integer;
-
- StaticKeys5: Cardinal;
- TextKeys5: integer;
- StaticKeys5Party: Cardinal;
- TextKeys5Party: integer;
-
- StaticKeys6: Cardinal;
- TextKeys6: integer;
- StaticKeys6Party: Cardinal;
- TextKeys6Party: integer;
-
- StaticKeys7: Cardinal;
- TextKeys7: integer;
- StaticKeys7Party: Cardinal;
- TextKeys7Party: integer;
-
- StaticKeys8: Cardinal;
- TextKeys8: integer;
- StaticKeys8Party: Cardinal;
- TextKeys8Party: integer;
+ StaticParty: Array of Cardinal;
+ TextParty: Array of Cardinal;
+ StaticNonParty: Array of Cardinal;
+ TextNonParty: Array of Cardinal;
constructor Create; override;
procedure SetScroll;
@@ -407,9 +372,11 @@ begin
end
else if (Mode = 1) then //PartyMode -> Show Menu
begin
- //Is this Right?
- ScreenSong.StartSong;
- //ScreenSongMenu.MenuShow(SM_Party_Main);
+ //Is this Right?
+ if (Ini.PartyPopup = 1) then
+ ScreenSongMenu.MenuShow(SM_Party_Main)
+ else
+ ScreenSong.StartSong;
end;
end;
end;
@@ -722,45 +689,22 @@ begin
StaticTeam3Joker4 := AddStatic(Theme.Song.StaticTeam3Joker4);
StaticTeam3Joker5 := AddStatic(Theme.Song.StaticTeam3Joker5);
- StaticKeys1 := AddStatic(Theme.Song.StaticKeys1);
- TextKeys1 := AddText(Theme.Song.TextKeys1);
- StaticKeys1Party := AddStatic(Theme.Song.StaticKeys1Party);
- TextKeys1Party := AddText(Theme.Song.TextKeys1Party);
-
- StaticKeys2 := AddStatic(Theme.Song.StaticKeys2);
- TextKeys2 := AddText(Theme.Song.TextKeys2);
- StaticKeys2Party := AddStatic(Theme.Song.StaticKeys2Party);
- TextKeys2Party := AddText(Theme.Song.TextKeys2Party);
-
- StaticKeys3 := AddStatic(Theme.Song.StaticKeys3);
- TextKeys3 := AddText(Theme.Song.TextKeys3);
- StaticKeys3Party := AddStatic(Theme.Song.StaticKeys3Party);
- TextKeys3Party := AddText(Theme.Song.TextKeys3Party);
-
- StaticKeys4 := AddStatic(Theme.Song.StaticKeys4);
- TextKeys4 := AddText(Theme.Song.TextKeys4);
- StaticKeys4Party := AddStatic(Theme.Song.StaticKeys4Party);
- TextKeys4Party := AddText(Theme.Song.TextKeys4Party);
-
- StaticKeys5 := AddStatic(Theme.Song.StaticKeys5);
- TextKeys5 := AddText(Theme.Song.TextKeys5);
- StaticKeys5Party := AddStatic(Theme.Song.StaticKeys5Party);
- TextKeys5Party := AddText(Theme.Song.TextKeys5Party);
-
- StaticKeys6 := AddStatic(Theme.Song.StaticKeys6);
- TextKeys6 := AddText(Theme.Song.TextKeys6);
- StaticKeys6Party := AddStatic(Theme.Song.StaticKeys6Party);
- TextKeys6Party := AddText(Theme.Song.TextKeys6Party);
-
- StaticKeys7 := AddStatic(Theme.Song.StaticKeys7);
- TextKeys7 := AddText(Theme.Song.TextKeys7);
- StaticKeys7Party := AddStatic(Theme.Song.StaticKeys7Party);
- TextKeys7Party := AddText(Theme.Song.TextKeys7Party);
-
- StaticKeys8 := AddStatic(Theme.Song.StaticKeys8);
- TextKeys8 := AddText(Theme.Song.TextKeys8);
- StaticKeys8Party := AddStatic(Theme.Song.StaticKeys8Party);
- TextKeys8Party := AddText(Theme.Song.TextKeys8Party);
+ //Load Party or NonParty specific Statics and Texts
+ SetLength(StaticParty, Length(Theme.Song.StaticParty));
+ for I := 0 to High(Theme.Song.StaticParty) do
+ StaticParty[I] := AddStatic(Theme.Song.StaticParty[I]);
+
+ SetLength(TextParty, Length(Theme.Song.TextParty));
+ for I := 0 to High(Theme.Song.TextParty) do
+ TextParty[I] := AddText(Theme.Song.TextParty[I]);
+
+ SetLength(StaticNonParty, Length(Theme.Song.StaticNonParty));
+ for I := 0 to High(Theme.Song.StaticNonParty) do
+ StaticNonParty[I] := AddStatic(Theme.Song.StaticNonParty[I]);
+
+ SetLength(TextNonParty, Length(Theme.Song.TextNonParty));
+ for I := 0 to High(Theme.Song.TextNonParty) do
+ TextNonParty[I] := AddText(Theme.Song.TextNonParty[I]);
// Song List
// Songs.LoadSongList; // moved to the UltraStar unit
@@ -1310,12 +1254,12 @@ begin
begin
SelectRandomSong;
- //Show Mennu direct in PartyMode
+ //Show Menu directly in PartyMode
//But only if selected in Options
if (Ini.PartyPopup = 1) then
- begin
+ begin
ScreenSongMenu.MenuShow(SM_Party_Main);
- end;
+ end;
end;
@@ -1754,97 +1698,27 @@ begin
end;
procedure TScreenSong.SetStatics;
+var
+ I: Integer;
+ Visible: Boolean;
begin
- //If Party Mode
- if Mode = 1 then //Use Statics for Party-Song-Selection
- begin
- Static[StaticKeys1].Visible := False;
- Text[TextKeys1].Visible := False;
- Static[StaticKeys1Party].Visible := True;
- Text[TextKeys1Party].Visible := True;
-
- Static[StaticKeys2].Visible := False;
- Text[TextKeys2].Visible := False;
- Static[StaticKeys2Party].Visible := True;
- Text[TextKeys2Party].Visible := True;
-
- Static[StaticKeys3].Visible := False;
- Text[TextKeys3].Visible := False;
- Static[StaticKeys3Party].Visible := True;
- Text[TextKeys3Party].Visible := True;
-
- Static[StaticKeys4].Visible := False;
- Text[TextKeys4].Visible := False;
- Static[StaticKeys4Party].Visible := True;
- Text[TextKeys4Party].Visible := True;
-
- Static[StaticKeys5].Visible := False;
- Text[TextKeys5].Visible := False;
- Static[StaticKeys5Party].Visible := True;
- Text[TextKeys5Party].Visible := True;
-
- Static[StaticKeys6].Visible := False;
- Text[TextKeys6].Visible := False;
- Static[StaticKeys6Party].Visible := True;
- Text[TextKeys6Party].Visible := True;
-
- Static[StaticKeys7].Visible := False;
- Text[TextKeys7].Visible := False;
- Static[StaticKeys7Party].Visible := True;
- Text[TextKeys7Party].Visible := True;
-
- Static[StaticKeys8].Visible := False;
- Text[TextKeys8].Visible := False;
- Static[StaticKeys8Party].Visible := True;
- Text[TextKeys8Party].Visible := True;
- end
- else //Use regular Statics for Song-Selection
- begin
- Static[StaticKeys1].Visible := True;
- Text[TextKeys1].Visible := True;
- Static[StaticKeys1Party].Visible := False;
- Text[TextKeys1Party].Visible := False;
-
- Static[StaticKeys2].Visible := True;
- Text[TextKeys2].Visible := True;
- Static[StaticKeys2Party].Visible := False;
- Text[TextKeys2Party].Visible := False;
-
- Static[StaticKeys2].Visible := True;
- Text[TextKeys2].Visible := True;
- Static[StaticKeys2Party].Visible := False;
- Text[TextKeys2Party].Visible := False;
-
- Static[StaticKeys3].Visible := True;
- Text[TextKeys3].Visible := True;
- Static[StaticKeys3Party].Visible := False;
- Text[TextKeys3Party].Visible := False;
-
- Static[StaticKeys4].Visible := True;
- Text[TextKeys4].Visible := True;
- Static[StaticKeys4Party].Visible := False;
- Text[TextKeys4Party].Visible := False;
-
- Static[StaticKeys5].Visible := True;
- Text[TextKeys5].Visible := True;
- Static[StaticKeys5Party].Visible := False;
- Text[TextKeys5Party].Visible := False;
-
- Static[StaticKeys6].Visible := True;
- Text[TextKeys6].Visible := True;
- Static[StaticKeys6Party].Visible := False;
- Text[TextKeys6Party].Visible := False;
-
- Static[StaticKeys7].Visible := True;
- Text[TextKeys7].Visible := True;
- Static[StaticKeys7Party].Visible := False;
- Text[TextKeys7Party].Visible := False;
-
- Static[StaticKeys8].Visible := True;
- Text[TextKeys8].Visible := True;
- Static[StaticKeys8Party].Visible := False;
- Text[TextKeys8Party].Visible := False;
- end;
+ //Set Visibility of Party Statics and Text
+ Visible := (Mode = 1);
+
+ For I := 0 to high(StaticParty) do
+ Static[StaticParty[I]].Visible := Visible;
+
+ 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
+ Static[StaticNonParty[I]].Visible := Visible;
+
+ For I := 0 to high(TextNonParty) do
+ Text[TextNonParty[I]].Visible := Visible;
end;
//Procedures for Menu