some changes in challenge mode

This commit is contained in:
Alexander Eckart committed 2012-12-21 16:55:43 +01:00
1 parent 9c62026d38
commit 296329faa9
7 files changed
+62 -99

No files matched your search

@@ -23,9 +23,8 @@
<TR_SCREENMAIN_TITLE>Challenge Modus: Übersicht</TR_SCREENMAIN_TITLE>
<TR_SCREENMAIN_TABLE_POS>Pos</TR_SCREENMAIN_TABLE_POS>
<TR_SCREENMAIN_TABLE_PLAYERNAME>Name</TR_SCREENMAIN_TABLE_PLAYERNAME>
<TR_SCREENMAIN_TABLE_WON>S</TR_SCREENMAIN_TABLE_WON>
<TR_SCREENMAIN_TABLE_DRAWN>U</TR_SCREENMAIN_TABLE_DRAWN>
<TR_SCREENMAIN_TABLE_LOST>N</TR_SCREENMAIN_TABLE_LOST>
<TR_SCREENMAIN_TABLE_NUMPLAYED>Runden</TR_SCREENMAIN_TABLE_NUMPLAYED>
<TR_SCREENMAIN_TABLE_WON>Siege</TR_SCREENMAIN_TABLE_WON>
<TR_SCREENMAIN_TABLE_SINGPOINTS>Sing-Punkte</TR_SCREENMAIN_TABLE_SINGPOINTS>
<TR_SCREENMAIN_TABLE_GAMEPOINTS>Punkte</TR_SCREENMAIN_TABLE_GAMEPOINTS>
</Texts>
@@ -23,9 +23,8 @@
<TR_SCREENMAIN_TITLE>Challenge Mode: Overview</TR_SCREENMAIN_TITLE>
<TR_SCREENMAIN_TABLE_POS>Pos</TR_SCREENMAIN_TABLE_POS>
<TR_SCREENMAIN_TABLE_PLAYERNAME>Name</TR_SCREENMAIN_TABLE_PLAYERNAME>
<TR_SCREENMAIN_TABLE_WON>W</TR_SCREENMAIN_TABLE_WON>
<TR_SCREENMAIN_TABLE_DRAWN>D</TR_SCREENMAIN_TABLE_DRAWN>
<TR_SCREENMAIN_TABLE_LOST>L</TR_SCREENMAIN_TABLE_LOST>
<TR_SCREENMAIN_TABLE_NUMPLAYED>Rounds</TR_SCREENMAIN_TABLE_NUMPLAYED>
<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>
</Texts>
@@ -23,9 +23,8 @@
<TR_SCREENMAIN_TITLE>TODO: Challenge Mode: Overview</TR_SCREENMAIN_TITLE>
<TR_SCREENMAIN_TABLE_POS>TODO: Pos</TR_SCREENMAIN_TABLE_POS>
<TR_SCREENMAIN_TABLE_PLAYERNAME>TODO: Name</TR_SCREENMAIN_TABLE_PLAYERNAME>
<TR_SCREENMAIN_TABLE_WON>TODO: W</TR_SCREENMAIN_TABLE_WON>
<TR_SCREENMAIN_TABLE_DRAWN>TODO: D</TR_SCREENMAIN_TABLE_DRAWN>
<TR_SCREENMAIN_TABLE_LOST>TODO: L</TR_SCREENMAIN_TABLE_LOST>
<TR_SCREENMAIN_TABLE_NUMPLAYED>TODO: Rounds</TR_SCREENMAIN_TABLE_NUMPLAYED>
<TR_SCREENMAIN_TABLE_WON>TODO: Wins</TR_SCREENMAIN_TABLE_WON>
<TR_SCREENMAIN_TABLE_SINGPOINTS>TODO: Sing Points</TR_SCREENMAIN_TABLE_SINGPOINTS>
<TR_SCREENMAIN_TABLE_GAMEPOINTS>TODO: Score</TR_SCREENMAIN_TABLE_GAMEPOINTS>
</Texts>
@@ -22,9 +22,8 @@
<!--ScreenMain-->
<TR_SCREENMAIN_TITLE>TODO: Challenge Mode: Overview</TR_SCREENMAIN_TITLE>
<TR_SCREENMAIN_TABLE_PLAYERNAME>TODO: Name</TR_SCREENMAIN_TABLE_PLAYERNAME>
<TR_SCREENMAIN_TABLE_WON>TODO: W</TR_SCREENMAIN_TABLE_WON>
<TR_SCREENMAIN_TABLE_DRAWN>TODO: D</TR_SCREENMAIN_TABLE_DRAWN>
<TR_SCREENMAIN_TABLE_LOST>TODO: L</TR_SCREENMAIN_TABLE_LOST>
<TR_SCREENMAIN_TABLE_NUMPLAYED>TODO: Rounds</TR_SCREENMAIN_TABLE_NUMPLAYED>
<TR_SCREENMAIN_TABLE_WON>TODO: Wins</TR_SCREENMAIN_TABLE_WON>
<TR_SCREENMAIN_TABLE_SINGPOINTS>TODO: Sing Points</TR_SCREENMAIN_TABLE_SINGPOINTS>
<TR_SCREENMAIN_TABLE_GAMEPOINTS>TODO: Score</TR_SCREENMAIN_TABLE_GAMEPOINTS>
</Texts>
@@ -116,7 +116,7 @@
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextPlayerName>
<TextWon>
<TextNumPlayed>
<!--<X>, <Y>: Text position-->
<X>400</X>
<Y>100</Y>
@@ -140,69 +140,40 @@
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENMAIN_TABLE_NUMPLAYED</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextNumPlayed>
<TextWon>
<!--<X>, <Y>: Text position-->
<X>500</X>
<Y>100</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>37</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>Right</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_TABLE_WON</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextWon>
<TextDrawn>
<!--<X>, <Y>: Text position-->
<X>475</X>
<Y>100</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>37</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>Right</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_TABLE_DRAWN</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextDrawn>
<TextLost>
<!--<X>, <Y>: Text position-->
<X>550</X>
<Y>100</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>37</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>Right</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_TABLE_LOST</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextLost>
<TextSingPoints>
<!--<X>, <Y>: Text position-->
<X>750</X>
+15 -11
View File
@@ -33,9 +33,8 @@ namespace Vocaluxe.PartyModes
{
public int PlayerID;
public int NumPlayed;
public int NumRounds;
public int NumWon;
public int NumDrawn;
public int NumLost;
public int SumSingPoints;
public int NumGamePoints;
@@ -128,8 +127,6 @@ namespace Vocaluxe.PartyModes
public int SingPoints;
public int GamePoints;
public int Won;
public int Drawn;
public int Lost;
}
private DataToScreenConfig ToScreenConfig;
@@ -514,9 +511,8 @@ namespace Vocaluxe.PartyModes
ResultTableRow row = new ResultTableRow();
row.PlayerID = GameData.ProfileIDs[i];
row.NumPlayed = 0;
row.NumRounds = 0;
row.NumWon = 0;
row.NumDrawn = 0;
row.NumLost = 0;
row.SumSingPoints = 0;
row.NumGamePoints = 0;
GameData.ResultTable.Add(row);
@@ -551,8 +547,7 @@ namespace Vocaluxe.PartyModes
row.NumPlayed++;
row.NumWon += points[i].Won;
row.NumDrawn += points[i].Drawn;
row.NumLost += points[i].Lost;
row.NumRounds += 1;
row.SumSingPoints += points[i].SingPoints;
row.NumGamePoints += points[i].GamePoints;
@@ -573,8 +568,6 @@ namespace Vocaluxe.PartyModes
stat.ProfileID = Results[i].ProfileID;
stat.SingPoints = (int)Results[i].Points;
stat.Won = 0;
stat.Drawn = 0;
stat.Lost = 0;
stat.GamePoints = 0;
result.Add(stat);
}
@@ -583,6 +576,7 @@ namespace Vocaluxe.PartyModes
int current = result[result.Count - 1].SingPoints;
int points = result.Count;
bool wonset = false;
for (int i = result.Count - 1; i >= 0; i--)
{
@@ -593,19 +587,29 @@ namespace Vocaluxe.PartyModes
if (current > res.SingPoints)
{
res.GamePoints = i * 2;
wonset = true;
points = res.GamePoints;
}
else
{
if (!wonset)
res.Won = 1;
res.GamePoints = points;
}
}
else
{
res.GamePoints = i * 2;
res.Won = 1;
}
current = res.SingPoints;
points = res.GamePoints;
result[i] = res;
}
return result;
}
}
+9 -17
View File
@@ -11,9 +11,8 @@ namespace Vocaluxe.PartyModes
{
public CText Pos;
public CText Name;
public CText Rounds;
public CText Won;
public CText Drawn;
public CText Lost;
public CText SingPoints;
public CText GamePoints;
}
@@ -26,9 +25,8 @@ namespace Vocaluxe.PartyModes
const string TextPosition = "TextPosition";
const string TextPlayerName = "TextPlayerName";
const string TextNumPlayed = "TextNumPlayed";
const string TextWon = "TextWon";
const string TextDrawn = "TextDrawn";
const string TextLost = "TextLost";
const string TextSingPoints = "TextSingPoints";
const string TextGamePoints = "TextGamePoints";
@@ -50,7 +48,7 @@ namespace Vocaluxe.PartyModes
base.Init();
_ThemeName = "PartyScreenChallengeMain";
_ThemeTexts = new string[] { TextPosition, TextPlayerName, TextWon, TextDrawn, TextLost, TextSingPoints, TextGamePoints };
_ThemeTexts = new string[] { TextPosition, TextPlayerName, TextNumPlayed, TextWon, TextSingPoints, TextGamePoints };
_ThemeButtons = new string[] { "ButtonNextRound" };
_ScreenVersion = ScreenVersion;
}
@@ -168,17 +166,15 @@ namespace Vocaluxe.PartyModes
row.Pos = GetNewText(Texts[htTexts(TextPosition)]);
row.Name = GetNewText(Texts[htTexts(TextPlayerName)]);
row.Rounds = GetNewText(Texts[htTexts(TextNumPlayed)]);
row.Won = GetNewText(Texts[htTexts(TextWon)]);
row.Drawn = GetNewText(Texts[htTexts(TextDrawn)]);
row.Lost = GetNewText(Texts[htTexts(TextLost)]);
row.SingPoints = GetNewText(Texts[htTexts(TextSingPoints)]);
row.GamePoints = GetNewText(Texts[htTexts(TextGamePoints)]);
row.Pos.Y += delta * (i + 1);
row.Name.Y += delta * (i + 1);
row.Rounds.Y += delta * (i + 1);
row.Won.Y += delta * (i + 1);
row.Drawn.Y += delta * (i + 1);
row.Lost.Y += delta * (i + 1);
row.SingPoints.Y += delta * (i + 1);
row.GamePoints.Y += delta * (i + 1);
@@ -186,17 +182,15 @@ namespace Vocaluxe.PartyModes
row.Pos.Visible = false;
row.Name.Visible = false;
row.Rounds.Visible = false;
row.Won.Visible = false;
row.Drawn.Visible = false;
row.Lost.Visible = false;
row.SingPoints.Visible = false;
row.GamePoints.Visible = false;
AddText(row.Pos);
AddText(row.Name);
AddText(row.Rounds);
AddText(row.Won);
AddText(row.Drawn);
AddText(row.Lost);
AddText(row.SingPoints);
AddText(row.GamePoints);
@@ -216,16 +210,14 @@ namespace Vocaluxe.PartyModes
row.Pos.Visible = true;
row.Name.Visible = true;
row.Rounds.Visible = true;
row.Won.Visible = true;
row.Drawn.Visible = true;
row.Lost.Visible = true;
row.SingPoints.Visible = true;
row.GamePoints.Visible = true;
row.Name.Text = profiles[GameState.ResultTable[i].PlayerID].PlayerName;
row.Rounds.Text = GameState.ResultTable[i].NumRounds.ToString();
row.Won.Text = GameState.ResultTable[i].NumWon.ToString();
row.Drawn.Text = GameState.ResultTable[i].NumDrawn.ToString();
row.Lost.Text = GameState.ResultTable[i].NumLost.ToString();
row.SingPoints.Text = GameState.ResultTable[i].SumSingPoints.ToString();
row.GamePoints.Text = GameState.ResultTable[i].NumGamePoints.ToString();
}