Added next players to challenge-main. Please check with > 2 mics.

This commit is contained in:
Florian Kuepper committed 2012-12-23 00:01:03 +01:00
1 parent cec33be07a
commit 07b0878bb3
6 files changed
+141 -7

No files matched your search

@@ -31,5 +31,6 @@
<TR_SCREENMAIN_TABLE_SINGPOINTS>Sing-Punkte</TR_SCREENMAIN_TABLE_SINGPOINTS>
<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>
</Texts>
</root>
@@ -30,6 +30,7 @@
<TR_SCREENMAIN_TABLE_WON>Wins</TR_SCREENMAIN_TABLE_WON>
<TR_SCREENMAIN_TABLE_SINGPOINTS>Sing Points</TR_SCREENMAIN_TABLE_SINGPOINTS>
<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_POPUP_REALLYEXIT>Do you really want to exit?</TR_SCREENMAIN_POPUP_REALLYEXIT>
<TR_SCREENMAIN_NEXT_PLAYER>Player of next round:</TR_SCREENMAIN_NEXT_PLAYER>
</Texts>
</root>
@@ -31,5 +31,6 @@
<TR_SCREENMAIN_TABLE_SINGPOINTS>TODO: Sing Points</TR_SCREENMAIN_TABLE_SINGPOINTS>
<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>
</Texts>
</root>
@@ -30,5 +30,6 @@
<TR_SCREENMAIN_TABLE_SINGPOINTS>TODO: Sing Points</TR_SCREENMAIN_TABLE_SINGPOINTS>
<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>
</Texts>
</root>
@@ -45,6 +45,22 @@
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</StaticPopupBG>
<StaticNextPlayer>
<!--<Skin>: Texture name-->
<Skin>Invisible</Skin>
<!--<X>, <Y>, <Z>, <W>, <H>: Static position, width and height-->
<X>0</X>
<Y>0</Y>
<Z>0,00</Z>
<W>100</W>
<H>100</H>
<!--<Color>: Static color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</StaticNextPlayer>
<Text1>
<!--<X>, <Y>: Text position-->
<X>640</X>
@@ -74,6 +90,35 @@
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Text1>
<Text2>
<!--<X>, <Y>: Text position-->
<X>640</X>
<Y>515</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</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_NEXT_PLAYER</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Text2>
<TextPosition>
<!--<X>, <Y>: Text position-->
<X>100</X>
@@ -248,6 +293,36 @@
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextGamePoints>
<TextNextPlayer>
<!--<X>, <Y>: Text position-->
<X>0</X>
<Y>0</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>100</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-->
</TextNextPlayer>
<TextPopupReallyExit>
<!--<X>, <Y>: Text position-->
<X>640</X>
@@ -255,7 +330,7 @@
<!--<Z>: Text position-->
<Z>-1,01</Z>
<!--<H>: Text height-->
<H>37</H>
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>380</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
@@ -284,7 +359,7 @@
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Button</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>985</X>
<X>1030</X>
<Y>600</Y>
<Z>0,00</Z>
<W>150</W>
@@ -341,7 +416,7 @@
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Button</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>145</X>
<X>100</X>
<Y>600</Y>
<Z>0,00</Z>
<W>150</W>
@@ -398,7 +473,7 @@
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Button</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>145</X>
<X>100</X>
<Y>600</Y>
<Z>0,00</Z>
<W>150</W>
+57 -2
View File
@@ -29,6 +29,7 @@ namespace Vocaluxe.PartyModes
const string TextWon = "TextWon";
const string TextSingPoints = "TextSingPoints";
const string TextGamePoints = "TextGamePoints";
const string TextNextPlayer = "TextNextPlayer";
const string TextPopupReallyExit = "TextPopupReallyExit";
const string ButtonNextRound = "ButtonNextRound";
@@ -38,6 +39,7 @@ namespace Vocaluxe.PartyModes
const string ButtonPopupNo = "ButtonPopupNo";
const string StaticPopupBG = "StaticPopupBG";
const string StaticNextPlayer = "StaticNextPlayer";
private bool ExitPopupVisible = false;
@@ -45,6 +47,9 @@ namespace Vocaluxe.PartyModes
private DataToScreenMain GameState;
private List<TableRow> Table;
private List<CText> NextPlayerTexts;
private List<CStatic> NextPlayerStatics;
public PartyScreenChallengeMain()
{
Data = new DataFromScreen();
@@ -56,9 +61,9 @@ namespace Vocaluxe.PartyModes
base.Init();
_ThemeName = "PartyScreenChallengeMain";
_ThemeTexts = new string[] { TextPosition, TextPlayerName, TextNumPlayed, TextWon, TextSingPoints, TextGamePoints, TextPopupReallyExit };
_ThemeTexts = new string[] { TextPosition, TextPlayerName, TextNumPlayed, TextWon, TextSingPoints, TextGamePoints, TextNextPlayer, TextPopupReallyExit };
_ThemeButtons = new string[] { ButtonNextRound, ButtonBack, ButtonExit, ButtonPopupYes, ButtonPopupNo };
_ThemeStatics = new string[] { StaticPopupBG };
_ThemeStatics = new string[] { StaticPopupBG, StaticNextPlayer };
_ScreenVersion = ScreenVersion;
}
@@ -68,6 +73,17 @@ namespace Vocaluxe.PartyModes
GameState = new DataToScreenMain();
BuildTable();
NextPlayerTexts = new List<CText>();
NextPlayerStatics = new List<CStatic>();
for (int i = 0; i < _PartyMode.GetMaxPlayer(); i++)
{
NextPlayerTexts.Add(GetNewText(Texts[htTexts(TextNextPlayer)]));
AddText(NextPlayerTexts[NextPlayerTexts.Count - 1]);
NextPlayerStatics.Add(GetNewStatic(Statics[htStatics(StaticNextPlayer)]));
AddStatic(NextPlayerStatics[NextPlayerStatics.Count - 1]);
}
}
public override void DataToScreen(object ReceivedData)
@@ -175,6 +191,8 @@ namespace Vocaluxe.PartyModes
base.OnShow();
Updatetable();
UpdateNextPlayerPositions();
UpdateNextPlayerContents();
if (GameState.CurrentRoundNr == 1)
{
@@ -236,6 +254,43 @@ namespace Vocaluxe.PartyModes
_PartyMode.DataFromScreen(_ThemeName, Data);
}
private void UpdateNextPlayerPositions()
{
float x = _Base.Settings.GetRenderW()/2 - ((GameState.NumPlayerAtOnce * Statics[htStatics(StaticNextPlayer)].Rect.W) + ((GameState.NumPlayerAtOnce-1) * 15))/2;
float static_y = 590;
float text_y = 550;
for (int i = 0; i < GameState.NumPlayerAtOnce; i++)
{
//static
NextPlayerStatics[i].Rect.X = x;
NextPlayerStatics[i].Rect.Y = static_y;
NextPlayerStatics[i].Visible = true;
//text
NextPlayerTexts[i].X = x + Statics[htStatics(StaticNextPlayer)].Rect.W / 2;
NextPlayerTexts[i].Y = text_y;
NextPlayerTexts[i].Visible = true;
x += Statics[htStatics(StaticNextPlayer)].Rect.W + 15;
}
for (int i = GameState.NumPlayerAtOnce; i < _PartyMode.GetMaxPlayer(); i++)
{
NextPlayerStatics[i].Visible = false;
NextPlayerTexts[i].Visible = false;
}
}
private void UpdateNextPlayerContents()
{
SProfile[] profiles = _Base.Profiles.GetProfiles();
for (int i = 0; i < GameState.NumPlayerAtOnce; i++)
{
int pid = GameState.Combs[GameState.CurrentRoundNr].Player[i];
NextPlayerStatics[i].Texture = profiles[GameState.ProfileIDs[pid]].Avatar.Texture;
NextPlayerTexts[i].Text = profiles[GameState.ProfileIDs[pid]].PlayerName;
NextPlayerTexts[i].Color = _Base.Theme.GetPlayerColor((i+1));
}
}
private void BuildTable()
{
Table = new List<TableRow>();