diff options
author | whiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-05-16 21:52:35 +0000 |
---|---|---|
committer | whiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-05-16 21:52:35 +0000 |
commit | 498ce4b4d57aa0b56c396eed61b499736f1722da (patch) | |
tree | 24b9bd43838fd7e6f9ca4fa580c84a041dfab0f6 | |
parent | 67cff73cf19d44788e578075abc498d01234e433 (diff) | |
download | usdx-498ce4b4d57aa0b56c396eed61b499736f1722da.tar.gz usdx-498ce4b4d57aa0b56c396eed61b499736f1722da.tar.xz usdx-498ce4b4d57aa0b56c396eed61b499736f1722da.zip |
finished adaption of PartyNewRound Screen
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1745 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r-- | Lua/src/screens/UScreenPartyNewRound.pas | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/Lua/src/screens/UScreenPartyNewRound.pas b/Lua/src/screens/UScreenPartyNewRound.pas index 4f7c6bbc..e0c8c567 100644 --- a/Lua/src/screens/UScreenPartyNewRound.pas +++ b/Lua/src/screens/UScreenPartyNewRound.pas @@ -183,18 +183,18 @@ end; procedure TScreenPartyNewRound.onShow; var I: Integer; - function GetTeamPlayers(const Num: Byte): String; + function GetTeamPlayers(const Num: Integer): String; var Players: Array of String; J: Integer; begin - if (Num >= Length(Party.Teams)) then + if (Num > High(Party.Teams)) or (Num < 0) then exit; //Create Players Array - SetLength(Players, Length(Party.Teams[Num-1].Players)); - For J := 0 to High(Party.Teams[Num-1].Players) do - Players[J] := Party.Teams[Num-1].Players[J].Name; + SetLength(Players, Length(Party.Teams[Num].Players)); + For J := 0 to High(Party.Teams[Num].Players) do + Players[J] := Party.Teams[Num].Players[J].Name; //Implode and Return Result := Language.Implode(Players); @@ -202,9 +202,6 @@ var begin inherited; - // to-do : Party - //PartySession.StartRound; - //Set Visibility of Round Infos for I := 0 to 6 do begin @@ -228,11 +225,11 @@ begin //Display Scores - {if (PartySession.Teams.NumTeams >= 1) then + if (Length(Party.Teams) >= 1) then 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].Text := InttoStr(Party.Teams[0].Score); + Text[TextNameTeam1].Text := Party.Teams[0].Name; + Text[TextTeam1Players].Text := GetTeamPlayers(0); Text[TextScoreTeam1].Visible := True; Text[TextNameTeam1].Visible := True; @@ -249,11 +246,11 @@ begin Static[StaticNextPlayer1].Visible := False; end; - if (PartySession.Teams.NumTeams >= 2) then + if (Length(Party.Teams) >= 2) then 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].Text := InttoStr(Party.Teams[1].Score); + Text[TextNameTeam2].Text := Party.Teams[1].Name; + Text[TextTeam2Players].Text := GetTeamPlayers(1); Text[TextScoreTeam2].Visible := True; Text[TextNameTeam2].Visible := True; @@ -270,11 +267,11 @@ begin Static[StaticNextPlayer2].Visible := False; end; - if (PartySession.Teams.NumTeams >= 3) then + if (Length(Party.Teams) >= 3) then 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].Text := InttoStr(Party.Teams[2].Score); + Text[TextNameTeam3].Text := Party.Teams[2].Name; + Text[TextTeam3Players].Text := GetTeamPlayers(2); Text[TextScoreTeam3].Visible := True; Text[TextNameTeam3].Visible := True; @@ -289,7 +286,7 @@ begin Text[TextTeam3Players].Visible := False; Static[StaticTeam3].Visible := False; Static[StaticNextPlayer3].Visible := False; - end; } + end; //nextRound Texts Text[TextNextRound].Text := Language.Translate('PLUGIN_' + uppercase(Party.Modes[Party.Rounds[Party.CurrentRound].Mode].Name) + '_DESC'); |