aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-06-20 18:14:10 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-06-20 18:14:10 +0000
commit077d1c500e6a90870dfa979303cd5003feffc359 (patch)
treedaf703a7beee5a6aecff3eb31e636010814ff4c5
parent92a343ee6465a52d16a48d4f1d674b2feae4b583 (diff)
downloadusdx-077d1c500e6a90870dfa979303cd5003feffc359.tar.gz
usdx-077d1c500e6a90870dfa979303cd5003feffc359.tar.xz
usdx-077d1c500e6a90870dfa979303cd5003feffc359.zip
Enabled Deco Texurechanging depending on TeamPlaylings in PartyScore Screen
Changed Theme to fit the Changes git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@266 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r--Game/Code/Classes/UThemes.pas32
-rw-r--r--Game/Code/Screens/UScreenPartyScore.pas87
-rw-r--r--Themes/Deluxe.ini15
3 files changed, 132 insertions, 2 deletions
diff --git a/Game/Code/Classes/UThemes.pas b/Game/Code/Classes/UThemes.pas
index dbb637e4..b55a84dc 100644
--- a/Game/Code/Classes/UThemes.pas
+++ b/Game/Code/Classes/UThemes.pas
@@ -587,6 +587,23 @@ type
StaticTeam3BG: TThemeStatic;
StaticTeam3Deco: TThemeStatic;
+ DecoTextures: record
+ ChangeTextures: Boolean;
+
+ FirstTexture: String;
+ FirstTyp: String;
+ FirstColor: String;
+
+ SecondTexture: String;
+ SecondTyp: String;
+ SecondColor: String;
+
+ ThirdTexture: String;
+ ThirdTyp: String;
+ ThirdColor: String;
+ end;
+
+
TextWinner: TThemeText;
end;
@@ -1361,6 +1378,21 @@ begin
ThemeLoadStatic (PartyScore.StaticTeam3BG, 'PartyScoreStaticTeam3BG');
ThemeLoadStatic (PartyScore.StaticTeam3Deco, 'PartyScoreStaticTeam3Deco');
+ //Load Party Score DecoTextures Object
+ PartyScore.DecoTextures.ChangeTextures := (ThemeIni.ReadInteger('PartyScoreDecoTextures', 'ChangeTextures', 0) = 1);
+
+ PartyScore.DecoTextures.FirstTexture := ThemeIni.ReadString('PartyScoreDecoTextures', 'FirstTexture', '');
+ PartyScore.DecoTextures.FirstTyp := ThemeIni.ReadString('PartyScoreDecoTextures', 'FirstTyp', 'Note Black');
+ PartyScore.DecoTextures.FirstColor := ThemeIni.ReadString('PartyScoreDecoTextures', 'FirstColor', 'Black');
+
+ PartyScore.DecoTextures.SecondTexture := ThemeIni.ReadString('PartyScoreDecoTextures', 'SecondTexture', '');
+ PartyScore.DecoTextures.SecondTyp := ThemeIni.ReadString('PartyScoreDecoTextures', 'SecondTyp', 'Note Black');
+ PartyScore.DecoTextures.SecondColor := ThemeIni.ReadString('PartyScoreDecoTextures', 'SecondColor', 'Black');
+
+ PartyScore.DecoTextures.ThirdTexture := ThemeIni.ReadString('PartyScoreDecoTextures', 'ThirdTexture', '');
+ PartyScore.DecoTextures.ThirdTyp := ThemeIni.ReadString('PartyScoreDecoTextures', 'ThirdTyp', 'Note Black');
+ PartyScore.DecoTextures.ThirdColor := ThemeIni.ReadString('PartyScoreDecoTextures', 'ThirdColor', 'Black');
+
ThemeLoadText (PartyScore.TextWinner, 'PartyScoreTextWinner');
//Party Win
diff --git a/Game/Code/Screens/UScreenPartyScore.pas b/Game/Code/Screens/UScreenPartyScore.pas
index 324656c0..5c632356 100644
--- a/Game/Code/Screens/UScreenPartyScore.pas
+++ b/Game/Code/Screens/UScreenPartyScore.pas
@@ -25,6 +25,11 @@ type
StaticTeam3Deco: Cardinal;
TextWinner: Cardinal;
+ DecoTex: Array[0..5] of Integer;
+ DecoColor: Array[0..5] of Record
+ R, G, B: Real;
+ end;
+
MaxScore: Word;
constructor Create; override;
@@ -35,7 +40,7 @@ type
implementation
-uses UGraphic, UMain, UParty, UScreenSingModi, ULanguage;
+uses UGraphic, UMain, UParty, UScreenSingModi, ULanguage, UTexture, USkins;
function TScreenPartyScore.ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean;
begin
@@ -75,6 +80,9 @@ end;
constructor TScreenPartyScore.Create;
var
I: integer;
+ Tex: TTexture;
+ R, G, B: Real;
+ Color: Integer;
begin
inherited Create;
@@ -97,12 +105,50 @@ begin
TextWinner := AddText (Theme.PartyScore.TextWinner);
+ //Load Deco Textures
+ if Theme.PartyScore.DecoTextures.ChangeTextures then
+ begin
+ //Get Color
+ LoadColor(R, G, B, Theme.PartyScore.DecoTextures.FirstColor);
+ Color := $10000 * Round(R*255) + $100 * Round(G*255) + Round(B*255);
+ DecoColor[0].R := R;
+ DecoColor[0].G := G;
+ DecoColor[0].B := B;
+
+ //Load Texture
+ Tex := Texture.LoadTexture(pchar(Skin.GetTextureFileName(Theme.PartyScore.DecoTextures.FirstTexture)), 'JPG', PChar(Theme.PartyScore.DecoTextures.FirstTyp), Color);
+ DecoTex[0] := Tex.TexNum;
+
+ //Get Second Color
+ LoadColor(R, G, B, Theme.PartyScore.DecoTextures.SecondColor);
+ Color := $10000 * Round(R*255) + $100 * Round(G*255) + Round(B*255);
+ DecoColor[1].R := R;
+ DecoColor[1].G := G;
+ DecoColor[1].B := B;
+
+ //Load Second Texture
+ Tex := Texture.LoadTexture(pchar(Skin.GetTextureFileName(Theme.PartyScore.DecoTextures.SecondTexture)), 'JPG', PChar(Theme.PartyScore.DecoTextures.SecondTyp), Color);
+ DecoTex[1] := Tex.TexNum;
+
+ //Get Third Color
+ LoadColor(R, G, B, Theme.PartyScore.DecoTextures.ThirdColor);
+ Color := $10000 * Round(R*255) + $100 * Round(G*255) + Round(B*255);
+ DecoColor[2].R := R;
+ DecoColor[2].G := G;
+ DecoColor[2].B := B;
+
+ //Load Third Texture
+ Tex := Texture.LoadTexture(pchar(Skin.GetTextureFileName(Theme.PartyScore.DecoTextures.ThirdTexture)), 'JPG', PChar(Theme.PartyScore.DecoTextures.ThirdTyp), Color);
+ DecoTex[2] := Tex.TexNum;
+ end;
+
LoadFromTheme(Theme.PartyScore);
end;
procedure TScreenPartyScore.onShow;
var
- I: Integer;
+ I, J: Integer;
+ Placings: Array [0..5] of Byte;
begin
//Get Maxscore
MaxScore := 0;
@@ -112,6 +158,16 @@ begin
MaxScore := ScreenSingModi.PlayerInfo.Playerinfo[I].Score;
end;
+ //Get Placings
+ for I := 0 to ScreenSingModi.PlayerInfo.NumPlayers - 1 do
+ begin
+ Placings[I] := 0;
+ for J := 0 to ScreenSingModi.PlayerInfo.NumPlayers - 1 do
+ If (ScreenSingModi.PlayerInfo.Playerinfo[J].Score > ScreenSingModi.PlayerInfo.Playerinfo[I].Score) then
+ Inc(Placings[I]);
+ end;
+
+
//Set Static Length
Static[StaticTeam1].Texture.ScaleW := ScreenSingModi.PlayerInfo.Playerinfo[0].Percentage / 100;
Static[StaticTeam2].Texture.ScaleW := ScreenSingModi.PlayerInfo.Playerinfo[1].Percentage / 100;
@@ -133,6 +189,15 @@ begin
Text[TextScoreTeam1].Text := InttoStr(ScreenSingModi.PlayerInfo.Playerinfo[0].Score);
Text[TextNameTeam1].Text := String(ScreenSingModi.TeamInfo.Teaminfo[0].Name);
+ //Set Deco Texture
+ if Theme.PartyScore.DecoTextures.ChangeTextures then
+ begin
+ Static[StaticTeam1Deco].Texture.TexNum := DecoTex[Placings[0]];
+ Static[StaticTeam1Deco].Texture.ColR := DecoColor[Placings[0]].R;
+ Static[StaticTeam1Deco].Texture.ColG := DecoColor[Placings[0]].G;
+ Static[StaticTeam1Deco].Texture.ColB := DecoColor[Placings[0]].B;
+ end;
+
Text[TextScoreTeam1].Visible := True;
Text[TextNameTeam1].Visible := True;
Static[StaticTeam1].Visible := True;
@@ -153,6 +218,15 @@ begin
Text[TextScoreTeam2].Text := InttoStr(ScreenSingModi.PlayerInfo.Playerinfo[1].Score);
Text[TextNameTeam2].Text := String(ScreenSingModi.TeamInfo.Teaminfo[1].Name);
+ //Set Deco Texture
+ if Theme.PartyScore.DecoTextures.ChangeTextures then
+ begin
+ Static[StaticTeam2Deco].Texture.TexNum := DecoTex[Placings[1]];
+ Static[StaticTeam2Deco].Texture.ColR := DecoColor[Placings[1]].R;
+ Static[StaticTeam2Deco].Texture.ColG := DecoColor[Placings[1]].G;
+ Static[StaticTeam2Deco].Texture.ColB := DecoColor[Placings[1]].B;
+ end;
+
Text[TextScoreTeam2].Visible := True;
Text[TextNameTeam2].Visible := True;
Static[StaticTeam2].Visible := True;
@@ -173,6 +247,15 @@ begin
Text[TextScoreTeam3].Text := InttoStr(ScreenSingModi.PlayerInfo.Playerinfo[2].Score);
Text[TextNameTeam3].Text := String(ScreenSingModi.TeamInfo.Teaminfo[2].Name);
+ //Set Deco Texture
+ if Theme.PartyScore.DecoTextures.ChangeTextures then
+ begin
+ Static[StaticTeam3Deco].Texture.TexNum := DecoTex[Placings[2]];
+ Static[StaticTeam3Deco].Texture.ColR := DecoColor[Placings[2]].R;
+ Static[StaticTeam3Deco].Texture.ColG := DecoColor[Placings[2]].G;
+ Static[StaticTeam3Deco].Texture.ColB := DecoColor[Placings[2]].B;
+ end;
+
Text[TextScoreTeam3].Visible := True;
Text[TextNameTeam3].Visible := True;
Static[StaticTeam3].Visible := True;
diff --git a/Themes/Deluxe.ini b/Themes/Deluxe.ini
index 80f09e1e..ecd807a2 100644
--- a/Themes/Deluxe.ini
+++ b/Themes/Deluxe.ini
@@ -5534,6 +5534,21 @@ Texts=5
[PartyScoreBackground]
Tex=PartyBG
+[PartyScoreDecoTextures]
+ChangeTextures =1
+
+FirstTexture =PartyScoreDeco
+FirstTyp =Font Black
+FirstColor =Gold
+
+SecondTexture =PartyScoreDeco
+SecondTyp =Font Black
+SecondColor =Silver
+
+ThirdTexture =PartyScoreDeco
+ThirdTyp =Font Black
+ThirdColor =Bronze
+
[PartyScoreStatic1]
X =0
Y =549