aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-06-08 18:29:33 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-06-08 18:29:33 +0000
commit56980dfdb5a44e03608689d3cd479d5c1c4a6dc4 (patch)
tree31ee66253fab8f01d2028be78ad026d1b2993b3a /Game/Code
parent4131257e42ceb88fa4fb2849b5c40011e8b5635d (diff)
downloadusdx-56980dfdb5a44e03608689d3cd479d5c1c4a6dc4.tar.gz
usdx-56980dfdb5a44e03608689d3cd479d5c1c4a6dc4.tar.xz
usdx-56980dfdb5a44e03608689d3cd479d5c1c4a6dc4.zip
Party Win Screen now changes the colors of the TeamBgs automaticly when Color = TeamColor
Changed Deluxe Team to fit the Changes git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@249 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code')
-rw-r--r--Game/Code/Screens/UScreenPartyWin.pas77
1 files changed, 77 insertions, 0 deletions
diff --git a/Game/Code/Screens/UScreenPartyWin.pas b/Game/Code/Screens/UScreenPartyWin.pas
index 1c4549a4..76d0420f 100644
--- a/Game/Code/Screens/UScreenPartyWin.pas
+++ b/Game/Code/Screens/UScreenPartyWin.pas
@@ -93,6 +93,14 @@ procedure TScreenPartyWin.onShow;
var
I: Integer;
Placing: TeamOrderArray;
+ Function GetTeamColor(Team: Byte): Cardinal;
+ var
+ NameString: String;
+ begin
+ NameString := 'P' + InttoStr(Team+1) + 'Dark';
+
+ Result := ColorExists(NameString);
+ end;
begin
//Get Team Placing
Placing := PartySession.GetTeamOrder;
@@ -110,6 +118,29 @@ begin
Static[StaticTeam1].Visible := True;
Static[StaticTeam1BG].Visible := True;
Static[StaticTeam1Deco].Visible := True;
+
+ //Set Static Color to Team Color
+ If (Theme.PartyWin.StaticTeam1BG.Color = 'TeamColor') then
+ begin
+ I := GetTeamColor(Placing[0]);
+ if (I <> -1) then
+ begin
+ Static[StaticTeam1BG].Texture.ColR := Color[I].RGB.R;
+ Static[StaticTeam1BG].Texture.ColG := Color[I].RGB.G;
+ Static[StaticTeam1BG].Texture.ColB := Color[I].RGB.B;
+ end;
+ end;
+
+ If (Theme.PartyWin.StaticTeam1.Color = 'TeamColor') then
+ begin
+ I := GetTeamColor(Placing[0]);
+ if (I <> -1) then
+ begin
+ Static[StaticTeam1].Texture.ColR := Color[I].RGB.R;
+ Static[StaticTeam1].Texture.ColG := Color[I].RGB.G;
+ Static[StaticTeam1].Texture.ColB := Color[I].RGB.B;
+ end;
+ end;
end
else
begin
@@ -130,6 +161,29 @@ begin
Static[StaticTeam2].Visible := True;
Static[StaticTeam2BG].Visible := True;
Static[StaticTeam2Deco].Visible := True;
+
+ //Set Static Color to Team Color
+ If (Theme.PartyWin.StaticTeam2BG.Color = 'TeamColor') then
+ begin
+ I := GetTeamColor(Placing[1]);
+ if (I <> -1) then
+ begin
+ Static[StaticTeam2BG].Texture.ColR := Color[I].RGB.R;
+ Static[StaticTeam2BG].Texture.ColG := Color[I].RGB.G;
+ Static[StaticTeam2BG].Texture.ColB := Color[I].RGB.B;
+ end;
+ end;
+
+ If (Theme.PartyWin.StaticTeam2.Color = 'TeamColor') then
+ begin
+ I := GetTeamColor(Placing[1]);
+ if (I <> -1) then
+ begin
+ Static[StaticTeam2].Texture.ColR := Color[I].RGB.R;
+ Static[StaticTeam2].Texture.ColG := Color[I].RGB.G;
+ Static[StaticTeam2].Texture.ColB := Color[I].RGB.B;
+ end;
+ end;
end
else
begin
@@ -150,6 +204,29 @@ begin
Static[StaticTeam3].Visible := True;
Static[StaticTeam3BG].Visible := True;
Static[StaticTeam3Deco].Visible := True;
+
+ //Set Static Color to Team Color
+ If (Theme.PartyWin.StaticTeam3BG.Color = 'TeamColor') then
+ begin
+ I := GetTeamColor(Placing[2]);
+ if (I <> -1) then
+ begin
+ Static[StaticTeam3BG].Texture.ColR := Color[I].RGB.R;
+ Static[StaticTeam3BG].Texture.ColG := Color[I].RGB.G;
+ Static[StaticTeam3BG].Texture.ColB := Color[I].RGB.B;
+ end;
+ end;
+
+ If (Theme.PartyWin.StaticTeam3.Color = 'TeamColor') then
+ begin
+ I := GetTeamColor(Placing[2]);
+ if (I <> -1) then
+ begin
+ Static[StaticTeam3].Texture.ColR := Color[I].RGB.R;
+ Static[StaticTeam3].Texture.ColG := Color[I].RGB.G;
+ Static[StaticTeam3].Texture.ColB := Color[I].RGB.B;
+ end;
+ end;
end
else
begin