Show finish message on challenge-main.

This commit is contained in:
Florian Kuepper committed 2012-12-24 10:50:52 +01:00
1 parent 9bbffd681d
commit dd9ef018e7
6 files changed
+105 -5

No files matched your search

@@ -32,5 +32,6 @@
<TR_SCREENMAIN_TABLE_GAMEPOINTS>Punkte</TR_SCREENMAIN_TABLE_GAMEPOINTS>
<TR_SCREENMAIN_POPUP_REALLYEXIT>Challenge-Mode wirklich beenden?</TR_SCREENMAIN_POPUP_REALLYEXIT>
<TR_SCREENMAIN_NEXT_PLAYER>Spieler der nächsten Runde:</TR_SCREENMAIN_NEXT_PLAYER>
<TR_SCREENMAIN_FINISH>Alle Runden wurden gesungen! Und der Gewinner ist...</TR_SCREENMAIN_FINISH>
</Texts>
</root>
@@ -32,5 +32,6 @@
<TR_SCREENMAIN_TABLE_GAMEPOINTS>Score</TR_SCREENMAIN_TABLE_GAMEPOINTS>
<TR_SCREENMAIN_POPUP_REALLYEXIT>Do you really want to exit?</TR_SCREENMAIN_POPUP_REALLYEXIT>
<TR_SCREENMAIN_NEXT_PLAYER>Player of next round:</TR_SCREENMAIN_NEXT_PLAYER>
<TR_SCREENMAIN_FINISH>All rounds were sung! And the winner is...</TR_SCREENMAIN_FINISH>
</Texts>
</root>
@@ -32,5 +32,6 @@
<TR_SCREENMAIN_TABLE_GAMEPOINTS>TODO: Score</TR_SCREENMAIN_TABLE_GAMEPOINTS>
<TR_SCREENMAIN_POPUP_REALLYEXIT>TODO: Do you really want to exit?</TR_SCREENMAIN_POPUP_REALLYEXIT>
<TR_SCREENMAIN_NEXT_PLAYER>TODO: Player of next round:</TR_SCREENMAIN_NEXT_PLAYER>
<TR_SCREENMAIN_FINISH>TODO: All rounds were sung! And the winner is...</TR_SCREENMAIN_FINISH>
</Texts>
</root>
@@ -31,5 +31,6 @@
<TR_SCREENMAIN_TABLE_GAMEPOINTS>TODO: Score</TR_SCREENMAIN_TABLE_GAMEPOINTS>
<TR_SCREENMAIN_POPUP_REALLYEXIT>TODO: Do you really want to exit?</TR_SCREENMAIN_POPUP_REALLYEXIT>
<TR_SCREENMAIN_NEXT_PLAYER>TODO: Player of next round:</TR_SCREENMAIN_NEXT_PLAYER>
<TR_SCREENMAIN_FINISH>TODO: All rounds were sung! And the winner is...</TR_SCREENMAIN_FINISH>
</Texts>
</root>
@@ -90,7 +90,7 @@
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Text1>
<Text2>
<TextNextPlayerMessage>
<!--<X>, <Y>: Text position-->
<X>640</X>
<Y>515</Y>
@@ -118,7 +118,66 @@
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Text2>
</TextNextPlayerMessage>
<TextFinishMessage>
<!--<X>, <Y>: Text position-->
<X>640</X>
<Y>520</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>50</H>
<!--<MaxW>: Maximum text width (if exists)-->
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENMAIN_FINISH</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextFinishMessage>
<TextFinishPlayerWin>
<!--<X>, <Y>: Text position-->
<X>640</X>
<Y>575</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>35</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>770</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text />
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextFinishPlayerWin>
<TextPosition>
<!--<X>, <Y>: Text position-->
<X>40</X>
+40 -3
View File
@@ -41,6 +41,9 @@ namespace Vocaluxe.PartyModes
const string TextRoundPlayer = "TextRoundPlayer";
const string TextRoundScore = "TextRoundScore";
const string TextRoundNumber = "TextRoundNumber";
const string TextFinishMessage = "TextFinishMessage";
const string TextFinishPlayerWin = "TextFinishPlayerWin";
const string TextNextPlayerMessage = "TextNextPlayerMessage";
const string ButtonNextRound = "ButtonNextRound";
const string ButtonBack = "ButtonBack";
@@ -83,7 +86,7 @@ namespace Vocaluxe.PartyModes
base.Init();
_ThemeName = "PartyScreenChallengeMain";
_ThemeTexts = new string[] { TextPosition, TextPlayerName, TextNumPlayed, TextWon, TextSingPoints, TextGamePoints, TextNextPlayer, TextPopupReallyExit, TextRoundNumber, TextRoundPlayer, TextRoundScore };
_ThemeTexts = new string[] { TextPosition, TextPlayerName, TextNumPlayed, TextWon, TextSingPoints, TextGamePoints, TextNextPlayer, TextPopupReallyExit, TextRoundNumber, TextRoundPlayer, TextRoundScore, TextFinishMessage, TextFinishPlayerWin, TextNextPlayerMessage };
_ThemeButtons = new string[] { ButtonNextRound, ButtonBack, ButtonExit, ButtonPopupYes, ButtonPopupNo, ButtonPlayerScrollDown, ButtonPlayerScrollUp, ButtonRoundsScrollDown, ButtonRoundsScrollUp };
_ThemeStatics = new string[] { StaticPopupBG, StaticNextPlayer };
_ScreenVersion = ScreenVersion;
@@ -259,7 +262,21 @@ namespace Vocaluxe.PartyModes
Buttons[htButtons(ButtonExit)].Visible = true;
}
SetInteractionToButton(Buttons[htButtons(ButtonNextRound)]);
if (GameState.CurrentRoundNr <= GameState.Combs.Count)
{
Buttons[htButtons(ButtonNextRound)].Visible = true;
Texts[htTexts(TextFinishMessage)].Visible = false;
Texts[htTexts(TextFinishPlayerWin)].Visible = false;
SetInteractionToButton(Buttons[htButtons(ButtonNextRound)]);
}
else
{
Buttons[htButtons(ButtonNextRound)].Visible = false;
Texts[htTexts(TextFinishMessage)].Visible = true;
Texts[htTexts(TextFinishPlayerWin)].Visible = true;
Texts[htTexts(TextFinishPlayerWin)].Text = GetPlayerWinString();
SetInteractionToButton(Buttons[htButtons(ButtonExit)]);
}
ShowPopup(false);
}
@@ -341,6 +358,7 @@ namespace Vocaluxe.PartyModes
{
if (GameState.CurrentRoundNr <= GameState.Combs.Count)
{
Texts[htTexts(TextNextPlayerMessage)].Visible = true;
SProfile[] profiles = _Base.Profiles.GetProfiles();
for (int i = 0; i < GameState.NumPlayerAtOnce; i++)
{
@@ -352,6 +370,7 @@ namespace Vocaluxe.PartyModes
}
else
{
Texts[htTexts(TextNextPlayerMessage)].Visible = false;
for (int i = 0; i < GameState.NumPlayerAtOnce; i++)
{
NextPlayerStatics[i].Visible = false;
@@ -557,7 +576,7 @@ namespace Vocaluxe.PartyModes
row.SingPoints.Visible = true;
row.GamePoints.Visible = true;
row.Pos.Text = GameState.ResultTable[i + PlayerTableOffset].Position.ToString();
row.Pos.Text = GameState.ResultTable[i + PlayerTableOffset].Position.ToString() + ".";
row.Name.Text = profiles[GameState.ResultTable[i+PlayerTableOffset].PlayerID].PlayerName;
row.Rounds.Text = GameState.ResultTable[i+PlayerTableOffset].NumRounds.ToString();
row.Won.Text = GameState.ResultTable[i+PlayerTableOffset].NumWon.ToString();
@@ -610,5 +629,23 @@ namespace Vocaluxe.PartyModes
UpdateRoundsTable();
}
private string GetPlayerWinString()
{
string s = "";
SProfile[] profiles = _Base.Profiles.GetProfiles();
for (int i = 0; i < GameState.ResultTable.Count; i++)
{
if (i > 0)
s += ", ";
if (GameState.ResultTable[i].Position == 1)
s += profiles[GameState.ResultTable[i].PlayerID].PlayerName;
else
break;
}
return s;
}
}
}