aboutsummaryrefslogtreecommitdiffstats
path: root/Game
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-04-30 15:50:23 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-04-30 15:50:23 +0000
commitac508bab2e69d6ed7987c23f383ed503a310785c (patch)
treed050d4cf5257ecfe2bf9d74801450eb7461032cc /Game
parent5737662e749229ef0631e3731858a5bf013c78eb (diff)
downloadusdx-ac508bab2e69d6ed7987c23f383ed503a310785c.tar.gz
usdx-ac508bab2e69d6ed7987c23f383ed503a310785c.tar.xz
usdx-ac508bab2e69d6ed7987c23f383ed503a310785c.zip
Added new Object to PartyNewRound Screen
TextTeam[1..3]Players: Text shows the Players of the Team git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@153 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/UThemes.pas12
-rw-r--r--Game/Code/Screens/UScreenPartyNewRound.pas36
2 files changed, 42 insertions, 6 deletions
diff --git a/Game/Code/Classes/UThemes.pas b/Game/Code/Classes/UThemes.pas
index 47c1abf1..6004502e 100644
--- a/Game/Code/Classes/UThemes.pas
+++ b/Game/Code/Classes/UThemes.pas
@@ -520,14 +520,16 @@ type
TextNameTeam1: TThemeText;
TextNameTeam2: TThemeText;
TextNameTeam3: TThemeText;
+ TextTeam1Players: TThemeText;
+ TextTeam2Players: TThemeText;
+ TextTeam3Players: TThemeText;
+
StaticTeam1: TThemeStatic;
StaticTeam2: TThemeStatic;
StaticTeam3: TThemeStatic;
StaticNextPlayer1: TThemeStatic;
StaticNextPlayer2: TThemeStatic;
StaticNextPlayer3: TThemeStatic;
-
- ButtonNext: TThemeButton;
end;
TThemePartyScore = class(TThemeBasic)
@@ -1217,6 +1219,10 @@ begin
ThemeLoadText (PartyNewRound.TextNameTeam2, 'PartyNewRoundTextNameTeam2');
ThemeLoadText (PartyNewRound.TextNameTeam3, 'PartyNewRoundTextNameTeam3');
+ ThemeLoadText (PartyNewRound.TextTeam1Players, 'PartyNewRoundTextTeam1Players');
+ ThemeLoadText (PartyNewRound.TextTeam2Players, 'PartyNewRoundTextTeam2Players');
+ ThemeLoadText (PartyNewRound.TextTeam3Players, 'PartyNewRoundTextTeam3Players');
+
ThemeLoadStatic (PartyNewRound.StaticTeam1, 'PartyNewRoundStaticTeam1');
ThemeLoadStatic (PartyNewRound.StaticTeam2, 'PartyNewRoundStaticTeam2');
ThemeLoadStatic (PartyNewRound.StaticTeam3, 'PartyNewRoundStaticTeam3');
@@ -1224,8 +1230,6 @@ begin
ThemeLoadStatic (PartyNewRound.StaticNextPlayer2, 'PartyNewRoundStaticNextPlayer2');
ThemeLoadStatic (PartyNewRound.StaticNextPlayer3, 'PartyNewRoundStaticNextPlayer3');
- ThemeLoadButton (PartyNewRound.ButtonNext, 'PartyNewRoundButtonNext');
-
//Party Score
ThemeLoadBasic(PartyScore, 'PartyScore');
diff --git a/Game/Code/Screens/UScreenPartyNewRound.pas b/Game/Code/Screens/UScreenPartyNewRound.pas
index 09391438..22f76218 100644
--- a/Game/Code/Screens/UScreenPartyNewRound.pas
+++ b/Game/Code/Screens/UScreenPartyNewRound.pas
@@ -48,6 +48,10 @@ type
TextNameTeam2: Cardinal;
TextNameTeam3: Cardinal;
+ TextTeam1Players: Cardinal;
+ TextTeam2Players: Cardinal;
+ TextTeam3Players: Cardinal;
+
StaticTeam1: Cardinal;
StaticTeam2: Cardinal;
StaticTeam3: Cardinal;
@@ -153,6 +157,11 @@ begin
TextNameTeam2 := AddText (Theme.PartyNewRound.TextNameTeam2);
TextNameTeam3 := AddText (Theme.PartyNewRound.TextNameTeam3);
+ //Players
+ TextTeam1Players := AddText (Theme.PartyNewRound.TextTeam1Players);
+ TextTeam2Players := AddText (Theme.PartyNewRound.TextTeam2Players);
+ TextTeam3Players := AddText (Theme.PartyNewRound.TextTeam3Players);
+
StaticTeam1 := AddStatic (Theme.PartyNewRound.StaticTeam1);
StaticTeam2 := AddStatic (Theme.PartyNewRound.StaticTeam2);
StaticTeam3 := AddStatic (Theme.PartyNewRound.StaticTeam3);
@@ -166,6 +175,22 @@ end;
procedure TScreenPartyNewRound.onShow;
var
I: Integer;
+ function GetTeamPlayers(const Num: Byte): String;
+ var
+ Players: Array of String;
+ J: Byte;
+ begin
+ if (Num-1 >= PartySession.Teams.NumTeams) then
+ exit;
+
+ //Create Players Array
+ SetLength(Players, PartySession.Teams.TeamInfo[Num-1].NumPlayers);
+ For J := 0 to PartySession.Teams.TeamInfo[Num-1].NumPlayers-1 do
+ Players[J] := String(PartySession.Teams.TeamInfo[Num-1].PlayerInfo[J].Name);
+
+ //Implode and Return
+ Result := Language.Implode(Players);
+ end;
begin
PartySession.StartRound;
@@ -295,9 +320,11 @@ begin
begin
Text[TextScoreTeam1].Text := InttoStr(PartySession.Teams.TeamInfo[0].Score);
Text[TextNameTeam1].Text := String(PartySession.Teams.TeamInfo[0].Name);
+ Text[TextTeam1Players].Text := GetTeamPlayers(1);
Text[TextScoreTeam1].Visible := True;
Text[TextNameTeam1].Visible := True;
+ Text[TextTeam1Players].Visible := True;
Static[StaticTeam1].Visible := True;
Static[StaticNextPlayer1].Visible := True;
end
@@ -305,6 +332,7 @@ begin
begin
Text[TextScoreTeam1].Visible := False;
Text[TextNameTeam1].Visible := False;
+ Text[TextTeam1Players].Visible := False;
Static[StaticTeam1].Visible := False;
Static[StaticNextPlayer1].Visible := False;
end;
@@ -313,9 +341,11 @@ begin
begin
Text[TextScoreTeam2].Text := InttoStr(PartySession.Teams.TeamInfo[1].Score);
Text[TextNameTeam2].Text := String(PartySession.Teams.TeamInfo[1].Name);
+ Text[TextTeam2Players].Text := GetTeamPlayers(2);
Text[TextScoreTeam2].Visible := True;
Text[TextNameTeam2].Visible := True;
+ Text[TextTeam2Players].Visible := True;
Static[StaticTeam2].Visible := True;
Static[StaticNextPlayer2].Visible := True;
end
@@ -323,6 +353,7 @@ begin
begin
Text[TextScoreTeam2].Visible := False;
Text[TextNameTeam2].Visible := False;
+ Text[TextTeam2Players].Visible := False;
Static[StaticTeam2].Visible := False;
Static[StaticNextPlayer2].Visible := False;
end;
@@ -331,9 +362,11 @@ begin
begin
Text[TextScoreTeam3].Text := InttoStr(PartySession.Teams.TeamInfo[2].Score);
Text[TextNameTeam3].Text := String(PartySession.Teams.TeamInfo[2].Name);
+ Text[TextTeam3Players].Text := GetTeamPlayers(3);
Text[TextScoreTeam3].Visible := True;
Text[TextNameTeam3].Visible := True;
+ Text[TextTeam3Players].Visible := True;
Static[StaticTeam3].Visible := True;
Static[StaticNextPlayer3].Visible := True;
end
@@ -341,6 +374,7 @@ begin
begin
Text[TextScoreTeam3].Visible := False;
Text[TextNameTeam3].Visible := False;
+ Text[TextTeam3Players].Visible := False;
Static[StaticTeam3].Visible := False;
Static[StaticNextPlayer3].Visible := False;
end;
@@ -372,8 +406,6 @@ begin
else
Text[TextNextPlayer3].Visible := False;
- Log.LogError('Plugin Selected: ' + InttoStr(PartySession.Rounds[0].Plugin));
-
// LCD.WriteText(1, ' Choose mode: ');
// UpdateLCD;