aboutsummaryrefslogtreecommitdiffstats
path: root/unicode/src/screens/UScreenPartyNewRound.pas
diff options
context:
space:
mode:
Diffstat (limited to 'unicode/src/screens/UScreenPartyNewRound.pas')
-rw-r--r--unicode/src/screens/UScreenPartyNewRound.pas311
1 files changed, 157 insertions, 154 deletions
diff --git a/unicode/src/screens/UScreenPartyNewRound.pas b/unicode/src/screens/UScreenPartyNewRound.pas
index 4c90b4c7..afcf2f9d 100644
--- a/unicode/src/screens/UScreenPartyNewRound.pas
+++ b/unicode/src/screens/UScreenPartyNewRound.pas
@@ -34,72 +34,73 @@ interface
{$I switches.inc}
uses
- UMenu,
SDL,
+ SysUtils,
+ UMenu,
UDisplay,
UMusic,
UFiles,
- SysUtils,
UThemes;
type
TScreenPartyNewRound = class(TMenu)
public
//Texts:
- TextRound1: cardinal;
- TextRound2: cardinal;
- TextRound3: cardinal;
- TextRound4: cardinal;
- TextRound5: cardinal;
- TextRound6: cardinal;
- TextRound7: cardinal;
-
- TextWinner1: cardinal;
- TextWinner2: cardinal;
- TextWinner3: cardinal;
- TextWinner4: cardinal;
- TextWinner5: cardinal;
- TextWinner6: cardinal;
- TextWinner7: cardinal;
-
- TextNextRound: cardinal;
- TextNextRoundNo: cardinal;
- TextNextPlayer1: cardinal;
- TextNextPlayer2: cardinal;
- TextNextPlayer3: cardinal;
+ TextRound1: Cardinal;
+ TextRound2: Cardinal;
+ TextRound3: Cardinal;
+ TextRound4: Cardinal;
+ TextRound5: Cardinal;
+ TextRound6: Cardinal;
+ TextRound7: Cardinal;
+
+ TextWinner1: Cardinal;
+ TextWinner2: Cardinal;
+ TextWinner3: Cardinal;
+ TextWinner4: Cardinal;
+ TextWinner5: Cardinal;
+ TextWinner6: Cardinal;
+ TextWinner7: Cardinal;
+
+ TextNextRound: Cardinal;
+ TextNextRoundNo: Cardinal;
+ TextNextPlayer1: Cardinal;
+ TextNextPlayer2: Cardinal;
+ TextNextPlayer3: Cardinal;
//Statics
- StaticRound1: cardinal;
- StaticRound2: cardinal;
- StaticRound3: cardinal;
- StaticRound4: cardinal;
- StaticRound5: cardinal;
- StaticRound6: cardinal;
- StaticRound7: cardinal;
+ StaticRound1: Cardinal;
+ StaticRound2: Cardinal;
+ StaticRound3: Cardinal;
+ StaticRound4: Cardinal;
+ StaticRound5: Cardinal;
+ StaticRound6: Cardinal;
+ StaticRound7: Cardinal;
//Scores
- TextScoreTeam1: cardinal;
- TextScoreTeam2: cardinal;
- TextScoreTeam3: cardinal;
- TextNameTeam1: cardinal;
- TextNameTeam2: cardinal;
- TextNameTeam3: cardinal;
+ TextScoreTeam1: Cardinal;
+ TextScoreTeam2: Cardinal;
+ TextScoreTeam3: Cardinal;
+ TextNameTeam1: Cardinal;
+ TextNameTeam2: Cardinal;
+ TextNameTeam3: Cardinal;
- TextTeam1Players: cardinal;
- TextTeam2Players: cardinal;
- TextTeam3Players: cardinal;
+ TextTeam1Players: Cardinal;
+ TextTeam2Players: Cardinal;
+ TextTeam3Players: Cardinal;
+
+ StaticTeam1: Cardinal;
+ StaticTeam2: Cardinal;
+ StaticTeam3: Cardinal;
+ StaticNextPlayer1: Cardinal;
+ StaticNextPlayer2: Cardinal;
+ StaticNextPlayer3: Cardinal;
- StaticTeam1: cardinal;
- StaticTeam2: cardinal;
- StaticTeam3: cardinal;
- StaticNextPlayer1: cardinal;
- StaticNextPlayer2: cardinal;
- StaticNextPlayer3: cardinal;
constructor Create; override;
- function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override;
procedure onShow; override;
procedure SetAnimationProgress(Progress: real); override;
end;
@@ -118,10 +119,10 @@ uses
ULog,
UUnicodeUtils;
-function TScreenPartyNewRound.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
+function TScreenPartyNewRound.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean;
begin
Result := true;
- if (PressedDown) then
+ If (PressedDown) Then
begin // Key Down
// check normal keys
case UCS4UpperCase(CharCode) of
@@ -218,19 +219,19 @@ end;
procedure TScreenPartyNewRound.onShow;
var
- I: integer;
- function GetTeamPlayers(const Num: byte): string;
+ I: Integer;
+ function GetTeamPlayers(const Num: Byte): String;
var
Players: array of UTF8String;
- J: byte;
- begin
- if (Num-1 >= PartySession.Teams.NumTeams) then
+ //J: Byte;
+ begin // to-do : Party
+ if (Num-1 >= {PartySession.Teams.NumTeams}0) then
exit;
- //Create Players array
+ {//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);
+ 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);
@@ -238,191 +239,193 @@ var
begin
inherited;
- PartySession.StartRound;
+ // to-do : Party
+ //PartySession.StartRound;
//Set Visibility of Round Infos
- I := Length(PartySession.Rounds);
+ // to-do : Party
+ I := {Length(PartySession.Rounds)}0;
if (I >= 1) then
begin
- Static[StaticRound1].Visible := true;
- Text[TextRound1].Visible := true;
- Text[TextWinner1].Visible := true;
+ Static[StaticRound1].Visible := True;
+ Text[TextRound1].Visible := True;
+ Text[TextWinner1].Visible := True;
//Texts:
- Text[TextRound1].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[0].Plugin].Name);
- Text[TextWinner1].Text := PartySession.GetWinnerString(0);
+ //Text[TextRound1].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[0].Plugin].Name);
+ //Text[TextWinner1].Text := PartySession.GetWinnerString(0);
end
else
begin
- Static[StaticRound1].Visible := false;
- Text[TextRound1].Visible := false;
- Text[TextWinner1].Visible := false;
+ Static[StaticRound1].Visible := False;
+ Text[TextRound1].Visible := False;
+ Text[TextWinner1].Visible := False;
end;
if (I >= 2) then
begin
- Static[StaticRound2].Visible := true;
- Text[TextRound2].Visible := true;
- Text[TextWinner2].Visible := true;
+ Static[StaticRound2].Visible := True;
+ Text[TextRound2].Visible := True;
+ Text[TextWinner2].Visible := True;
//Texts:
- Text[TextRound2].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[1].Plugin].Name);
- Text[TextWinner2].Text := PartySession.GetWinnerString(1);
+ //Text[TextRound2].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[1].Plugin].Name);
+ //Text[TextWinner2].Text := PartySession.GetWinnerString(1);
end
else
begin
- Static[StaticRound2].Visible := false;
- Text[TextRound2].Visible := false;
- Text[TextWinner2].Visible := false;
+ Static[StaticRound2].Visible := False;
+ Text[TextRound2].Visible := False;
+ Text[TextWinner2].Visible := False;
end;
if (I >= 3) then
begin
- Static[StaticRound3].Visible := true;
- Text[TextRound3].Visible := true;
- Text[TextWinner3].Visible := true;
+ Static[StaticRound3].Visible := True;
+ Text[TextRound3].Visible := True;
+ Text[TextWinner3].Visible := True;
//Texts:
- Text[TextRound3].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[2].Plugin].Name);
- Text[TextWinner3].Text := PartySession.GetWinnerString(2);
+ //Text[TextRound3].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[2].Plugin].Name);
+ //Text[TextWinner3].Text := PartySession.GetWinnerString(2);
end
else
begin
- Static[StaticRound3].Visible := false;
- Text[TextRound3].Visible := false;
- Text[TextWinner3].Visible := false;
+ Static[StaticRound3].Visible := False;
+ Text[TextRound3].Visible := False;
+ Text[TextWinner3].Visible := False;
end;
if (I >= 4) then
begin
- Static[StaticRound4].Visible := true;
- Text[TextRound4].Visible := true;
- Text[TextWinner4].Visible := true;
+ Static[StaticRound4].Visible := True;
+ Text[TextRound4].Visible := True;
+ Text[TextWinner4].Visible := True;
//Texts:
- Text[TextRound4].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[3].Plugin].Name);
- Text[TextWinner4].Text := PartySession.GetWinnerString(3);
+ //Text[TextRound4].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[3].Plugin].Name);
+ //Text[TextWinner4].Text := PartySession.GetWinnerString(3);
end
else
begin
- Static[StaticRound4].Visible := false;
- Text[TextRound4].Visible := false;
- Text[TextWinner4].Visible := false;
+ Static[StaticRound4].Visible := False;
+ Text[TextRound4].Visible := False;
+ Text[TextWinner4].Visible := False;
end;
if (I >= 5) then
begin
- Static[StaticRound5].Visible := true;
- Text[TextRound5].Visible := true;
- Text[TextWinner5].Visible := true;
+ Static[StaticRound5].Visible := True;
+ Text[TextRound5].Visible := True;
+ Text[TextWinner5].Visible := True;
//Texts:
- Text[TextRound5].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[4].Plugin].Name);
- Text[TextWinner5].Text := PartySession.GetWinnerString(4);
+ //Text[TextRound5].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[4].Plugin].Name);
+ //Text[TextWinner5].Text := PartySession.GetWinnerString(4);
end
else
begin
- Static[StaticRound5].Visible := false;
- Text[TextRound5].Visible := false;
- Text[TextWinner5].Visible := false;
+ Static[StaticRound5].Visible := False;
+ Text[TextRound5].Visible := False;
+ Text[TextWinner5].Visible := False;
end;
if (I >= 6) then
begin
- Static[StaticRound6].Visible := true;
- Text[TextRound6].Visible := true;
- Text[TextWinner6].Visible := true;
+ Static[StaticRound6].Visible := True;
+ Text[TextRound6].Visible := True;
+ Text[TextWinner6].Visible := True;
//Texts:
- Text[TextRound6].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[5].Plugin].Name);
- Text[TextWinner6].Text := PartySession.GetWinnerString(5);
+ //Text[TextRound6].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[5].Plugin].Name);
+ //Text[TextWinner6].Text := PartySession.GetWinnerString(5);
end
else
begin
- Static[StaticRound6].Visible := false;
- Text[TextRound6].Visible := false;
- Text[TextWinner6].Visible := false;
+ Static[StaticRound6].Visible := False;
+ Text[TextRound6].Visible := False;
+ Text[TextWinner6].Visible := False;
end;
if (I >= 7) then
begin
- Static[StaticRound7].Visible := true;
- Text[TextRound7].Visible := true;
- Text[TextWinner7].Visible := true;
+ Static[StaticRound7].Visible := True;
+ Text[TextRound7].Visible := True;
+ Text[TextWinner7].Visible := True;
//Texts:
- Text[TextRound7].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[6].Plugin].Name);
- Text[TextWinner7].Text := PartySession.GetWinnerString(6);
+ //Text[TextRound7].Text := Language.Translate(DllMan.Plugins[PartySession.Rounds[6].Plugin].Name);
+ //Text[TextWinner7].Text := PartySession.GetWinnerString(6);
end
else
begin
- Static[StaticRound7].Visible := false;
- Text[TextRound7].Visible := false;
- Text[TextWinner7].Visible := false;
+ Static[StaticRound7].Visible := False;
+ Text[TextRound7].Visible := False;
+ Text[TextWinner7].Visible := False;
end;
//Display Scores
- if (PartySession.Teams.NumTeams >= 1) then
+ {if (PartySession.Teams.NumTeams >= 1) then
begin
Text[TextScoreTeam1].Text := InttoStr(PartySession.Teams.TeamInfo[0].Score);
- Text[TextNameTeam1].Text := string(PartySession.Teams.TeamInfo[0].Name);
+ 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;
+ Text[TextScoreTeam1].Visible := True;
+ Text[TextNameTeam1].Visible := True;
+ Text[TextTeam1Players].Visible := True;
+ Static[StaticTeam1].Visible := True;
+ Static[StaticNextPlayer1].Visible := True;
end
else
begin
- Text[TextScoreTeam1].Visible := false;
- Text[TextNameTeam1].Visible := false;
- Text[TextTeam1Players].Visible := false;
- Static[StaticTeam1].Visible := false;
- Static[StaticNextPlayer1].Visible := false;
+ Text[TextScoreTeam1].Visible := False;
+ Text[TextNameTeam1].Visible := False;
+ Text[TextTeam1Players].Visible := False;
+ Static[StaticTeam1].Visible := False;
+ Static[StaticNextPlayer1].Visible := False;
end;
if (PartySession.Teams.NumTeams >= 2) then
begin
Text[TextScoreTeam2].Text := InttoStr(PartySession.Teams.TeamInfo[1].Score);
- Text[TextNameTeam2].Text := string(PartySession.Teams.TeamInfo[1].Name);
+ 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;
+ Text[TextScoreTeam2].Visible := True;
+ Text[TextNameTeam2].Visible := True;
+ Text[TextTeam2Players].Visible := True;
+ Static[StaticTeam2].Visible := True;
+ Static[StaticNextPlayer2].Visible := True;
end
else
begin
- Text[TextScoreTeam2].Visible := false;
- Text[TextNameTeam2].Visible := false;
- Text[TextTeam2Players].Visible := false;
- Static[StaticTeam2].Visible := false;
- Static[StaticNextPlayer2].Visible := false;
+ Text[TextScoreTeam2].Visible := False;
+ Text[TextNameTeam2].Visible := False;
+ Text[TextTeam2Players].Visible := False;
+ Static[StaticTeam2].Visible := False;
+ Static[StaticNextPlayer2].Visible := False;
end;
if (PartySession.Teams.NumTeams >= 3) then
begin
Text[TextScoreTeam3].Text := InttoStr(PartySession.Teams.TeamInfo[2].Score);
- Text[TextNameTeam3].Text := string(PartySession.Teams.TeamInfo[2].Name);
+ 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;
+ Text[TextScoreTeam3].Visible := True;
+ Text[TextNameTeam3].Visible := True;
+ Text[TextTeam3Players].Visible := True;
+ Static[StaticTeam3].Visible := True;
+ Static[StaticNextPlayer3].Visible := True;
end
else
begin
- Text[TextScoreTeam3].Visible := false;
- Text[TextNameTeam3].Visible := false;
- Text[TextTeam3Players].Visible := false;
- Static[StaticTeam3].Visible := false;
- Static[StaticNextPlayer3].Visible := false;
+ Text[TextScoreTeam3].Visible := False;
+ Text[TextNameTeam3].Visible := False;
+ Text[TextTeam3Players].Visible := False;
+ Static[StaticTeam3].Visible := False;
+ Static[StaticNextPlayer3].Visible := False;
end;
//nextRound Texts
@@ -431,26 +434,26 @@ begin
if (PartySession.Teams.NumTeams >= 1) then
begin
Text[TextNextPlayer1].Text := PartySession.Teams.Teaminfo[0].Playerinfo[PartySession.Teams.Teaminfo[0].CurPlayer].Name;
- Text[TextNextPlayer1].Visible := true;
+ Text[TextNextPlayer1].Visible := True;
end
else
- Text[TextNextPlayer1].Visible := false;
+ Text[TextNextPlayer1].Visible := False;
if (PartySession.Teams.NumTeams >= 2) then
begin
Text[TextNextPlayer2].Text := PartySession.Teams.Teaminfo[1].Playerinfo[PartySession.Teams.Teaminfo[1].CurPlayer].Name;
- Text[TextNextPlayer2].Visible := true;
+ Text[TextNextPlayer2].Visible := True;
end
else
- Text[TextNextPlayer2].Visible := false;
+ Text[TextNextPlayer2].Visible := False;
if (PartySession.Teams.NumTeams >= 3) then
begin
Text[TextNextPlayer3].Text := PartySession.Teams.Teaminfo[2].Playerinfo[PartySession.Teams.Teaminfo[2].CurPlayer].Name;
- Text[TextNextPlayer3].Visible := true;
+ Text[TextNextPlayer3].Visible := True;
end
else
- Text[TextNextPlayer3].Visible := false;
+ Text[TextNextPlayer3].Visible := False; }
end;
procedure TScreenPartyNewRound.SetAnimationProgress(Progress: real);