From f11d9806f4623dc4dbf14e521624109b7a69b86b Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Thu, 17 May 2007 10:33:27 +0000 Subject: 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 --- Game/Code/Classes/UThemes.pas | 89 +++------------ Game/Code/Screens/UScreenSong.pas | 222 +++++++++----------------------------- Themes/Deluxe.ini | 160 +++++++-------------------- 3 files changed, 98 insertions(+), 373 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 diff --git a/Themes/Deluxe.ini b/Themes/Deluxe.ini index cecd32b0..73fe2102 100644 --- a/Themes/Deluxe.ini +++ b/Themes/Deluxe.ini @@ -421,12 +421,19 @@ Text= #Variable statics and texts for song-screen in sing- and partymode -#Each static or text comes in 2 versions now. E.g SongStaticKeys8Text and SongStaticKeys8TextParty. (Doh, i have to alter the names) -#There are 8 statics and 8 texts for each mode. 32 items alltogether. - +# There can be an unlimited Number of Statics and Texts, As long +# as the numbers are in order. +# Statics that are shown in PartyMode Only are Named_ +# SongStaticParty[No] +# Texts that are shown in PartyMode Only are Named_ +# SongTextParty[No] +# Statics that are shown in Normal Mode Only are Named_ +# SongStaticNonParty[No] +# Texts that are shown in Normal Mode Only are Named_ +# SongTextNonParty[No] #Here are the ones for singmode -[SongStaticKeys1] +[SongStaticNonParty1] X =40 Y =22 W =27 @@ -435,7 +442,7 @@ Color =White Tex =SongCD Type=Font Black -[SongStaticKeys2] +[SongStaticNonParty2] X =260 Y =553 W =26 @@ -444,7 +451,7 @@ Tex=ButtonAlt Color =White Type=Plain -[SongStaticKeys3] +[SongStaticNonParty3] X =300 Y =553 W =26 @@ -453,7 +460,7 @@ Tex=ButtonAZ Color =White Type=Plain -[SongStaticKeys4] +[SongStaticNonParty4] X =425 Y =553 W =22 @@ -462,7 +469,7 @@ Tex=ButtonM Color =White Type=Plain -[SongStaticKeys5] +[SongStaticNonParty5] X =515 Y =553 W =22 @@ -471,7 +478,7 @@ Tex=ButtonJ Color =White Type=Plain -[SongStaticKeys6] +[SongStaticNonParty6] X =679 Y =553 W =22 @@ -480,27 +487,8 @@ Tex=ButtonP Color =White Type=Plain -#Not used in this theme -#[SongStaticKeys7] -#X = -#Y = -#W = -#H = -#Tex= -#Color = -#Type= - -#Not used in this theme -#[SongStaticKeys8] -#X = -#Y = -#W = -#H = -#Tex= -#Color = -#Type= - -[SongStaticKeys1Text] +#Texts Non Party +[SongTextNonParty1] X =70 Y =6 Color=White @@ -509,7 +497,7 @@ Size =20 Text=SING_SONG_SELECTION Align=0 -[SongStaticKeys2Text] +[SongTextNonParty2] X =238 Y =552 Color=Black @@ -518,7 +506,7 @@ Size =7 Align=2 Text=SING_SONG_SELECTION_WHEREAMI -[SongStaticKeys3Text] +[SongTextNonParty3] X =288 Y =556 Color=Black @@ -527,7 +515,7 @@ Size =5 Align=0 Text=+ -[SongStaticKeys4Text] +[SongTextNonParty4] X =330 Y =552 Color=Black @@ -536,7 +524,7 @@ Size =7 Align=0 Text=SING_SONG_SELECTION_GOTO -[SongStaticKeys5Text] +[SongTextNonParty5] X =450 Y =552 Color=Black @@ -545,7 +533,7 @@ Size =7 Align=0 Text=SING_SONG_SELECTION_MENU -[SongStaticKeys6Text] +[SongTextNonParty6] X =540 Y =552 Color=Black @@ -554,7 +542,7 @@ Size =7 Align=0 Text=SONG_JUMPTO_DESC -[SongStaticKeys7Text] +[SongTextNonParty7] X =705 Y =552 Color=Black @@ -563,19 +551,10 @@ Size =7 Align=0 Text=SING_SONG_SELECTION_PLAYLIST -#Not used in this Theme -#[SongStaticKeys8Text] -#X = -#Y = -#Color= -#Font =0 -#Size =0 -#Align=0 -#Text= #and theese are the ones for partymode -[SongStaticKeys1Party] +[SongStaticParty1] X =40 Y =22 W =27 @@ -584,7 +563,7 @@ Color =White Tex =PartyIcon Type=Font Black -[SongStaticKeys2Party] +[SongStaticParty2] X =260 Y =553 W =26 @@ -593,7 +572,7 @@ Tex=Button13 Color =White Type=Plain -[SongStaticKeys3Party] +[SongStaticParty3] X =400 Y =553 W =22 @@ -602,7 +581,7 @@ Tex=ButtonM Color =White Type=Plain -[SongStaticKeys4Party] +[SongStaticParty4] X =540 Y =553 W =26 @@ -611,47 +590,9 @@ Tex=ButtonEnter Color =White Type=Plain -#Not used in this theme -#[SongStaticKeys5Party] -#X = -#Y = -#W = -#H = -#Tex= -#Color = -#Type= - -#Not used in this theme -#[SongStaticKeys6Party] -#X = -#Y = -#W = -#H = -#Tex= -#Color = -#Type= - -#Not used in this theme -#[SongStaticKeys7Party] -#X = -#Y = -#W = -#H = -#Tex= -#Color = -#Type= - -#Not used in this theme -#[SongStaticKeys8Party] -#X = -#Y = -#W = -#H = -#Tex= -#Color = -#Type= - -[SongStaticKeys1TextParty] +#Texts for Party Mode + +[SongTextParty1] X =70 Y =6 ColR = 0.7 @@ -662,7 +603,7 @@ Size = 20 Color =White Text=PARTY_MODE -[SongStaticKeys2TextParty] +[SongTextParty2] X =238 Y =552 Color=Black @@ -671,7 +612,7 @@ Size =7 Align=2 Text=PARTY_SONG_WHEREAMI -[SongStaticKeys3TextParty] +[SongTextParty3] X =288 Y =552 Color=Black @@ -680,7 +621,7 @@ Size =7 Align=0 Text=SONG_MENU_NAME_PARTY_JOKER -[SongStaticKeys4TextParty] +[SongTextParty4] X =426 Y =552 Color=Black @@ -689,7 +630,7 @@ Size =7 Align=0 Text=PARTY_SONG_MENU -[SongStaticKeys5TextParty] +[SongTextParty5] X =570 Y =552 Color=Black @@ -698,39 +639,10 @@ Size =7 Align=0 Text=PARTY_SONG_LEGEND_CONTINUE -#Not used in this Theme -#[SongStaticKeys6TextParty] -#X = -#Y = -#Color= -#Font =0 -#Size =0 -#Align=0 -#Text= - -#Not used in this Theme -#[SongStaticKeys7TextParty] -#X = -#Y = -#Color= -#Font =0 -#Size =0 -#Align=0 -#Text= - -#Not used in this Theme -#[SongStaticKeys8TextParty] -#X = -#Y = -#Color= -#Font =0 -#Size =0 -#Align=0 -#Text= - #variable statics end +# Jokers, 5 for each team, only shown in party Mode [SongStaticTeam1Joker1] Tex =Joker X =480 -- cgit v1.2.3