Fixed scrolling. Added rounds-table-scrolling.
This commit is contained in:
1 parent
d5fe8274b1
commit
2fabc379d1
2 files changed
+235
-57
No files matched your search
@@ -824,5 +824,103 @@
|
|||||||
<!-- <Space>: Reflection Space of selected button-->
|
<!-- <Space>: Reflection Space of selected button-->
|
||||||
<!-- <Height>: Reflection Height of selected button-->
|
<!-- <Height>: Reflection Height of selected button-->
|
||||||
</ButtonPlayerScrollDown>
|
</ButtonPlayerScrollDown>
|
||||||
|
<ButtonRoundsScrollUp>
|
||||||
|
<!--<Skin>: Texture name-->
|
||||||
|
<Skin>ScrollUp</Skin>
|
||||||
|
<!--<SkinSelected>: Texture name for selected button-->
|
||||||
|
<SkinSelected>ScrollUp</SkinSelected>
|
||||||
|
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
|
||||||
|
<X>954</X>
|
||||||
|
<Y>94</Y>
|
||||||
|
<Z>-0,01</Z>
|
||||||
|
<W>28</W>
|
||||||
|
<H>15</H>
|
||||||
|
<!--<Color>: Button color from ColorScheme (high priority)-->
|
||||||
|
<!--or <R>, <G>, <B>, <A> (lower priority)-->
|
||||||
|
<Color>ButtonColor</Color>
|
||||||
|
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
|
||||||
|
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
|
||||||
|
<SColor>ButtonSColor</SColor>
|
||||||
|
<Text>
|
||||||
|
<!--<X>, <Y>: Text position-->
|
||||||
|
<X>75</X>
|
||||||
|
<Y>10</Y>
|
||||||
|
<!--<H>: Text height-->
|
||||||
|
<H>32</H>
|
||||||
|
<!--<MaxW>: Maximum text width (if exists)-->
|
||||||
|
<MaxW>142</MaxW>
|
||||||
|
<!--<Color>: Text color from ColorScheme (high priority)-->
|
||||||
|
<!--or <R>, <G>, <B>, <A> (lower priority)-->
|
||||||
|
<Color>ButtonTextColor</Color>
|
||||||
|
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
|
||||||
|
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
|
||||||
|
<SColor>ButtonTextSColor</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 />
|
||||||
|
</Text>
|
||||||
|
<!--<Reflection> If exists:-->
|
||||||
|
<!-- <Space>: Reflection Space-->
|
||||||
|
<!-- <Height>: Reflection Height-->
|
||||||
|
<!--<SReflection> If exists:-->
|
||||||
|
<!-- <Space>: Reflection Space of selected button-->
|
||||||
|
<!-- <Height>: Reflection Height of selected button-->
|
||||||
|
</ButtonRoundsScrollUp>
|
||||||
|
<ButtonRoundsScrollDown>
|
||||||
|
<!--<Skin>: Texture name-->
|
||||||
|
<Skin>ScrollDown</Skin>
|
||||||
|
<!--<SkinSelected>: Texture name for selected button-->
|
||||||
|
<SkinSelected>ScrollDown</SkinSelected>
|
||||||
|
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
|
||||||
|
<X>954</X>
|
||||||
|
<Y>515</Y>
|
||||||
|
<Z>-0,01</Z>
|
||||||
|
<W>28</W>
|
||||||
|
<H>15</H>
|
||||||
|
<!--<Color>: Button color from ColorScheme (high priority)-->
|
||||||
|
<!--or <R>, <G>, <B>, <A> (lower priority)-->
|
||||||
|
<Color>ButtonColor</Color>
|
||||||
|
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
|
||||||
|
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
|
||||||
|
<SColor>ButtonSColor</SColor>
|
||||||
|
<Text>
|
||||||
|
<!--<X>, <Y>: Text position-->
|
||||||
|
<X>75</X>
|
||||||
|
<Y>10</Y>
|
||||||
|
<!--<H>: Text height-->
|
||||||
|
<H>32</H>
|
||||||
|
<!--<MaxW>: Maximum text width (if exists)-->
|
||||||
|
<MaxW>142</MaxW>
|
||||||
|
<!--<Color>: Text color from ColorScheme (high priority)-->
|
||||||
|
<!--or <R>, <G>, <B>, <A> (lower priority)-->
|
||||||
|
<Color>ButtonTextColor</Color>
|
||||||
|
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
|
||||||
|
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
|
||||||
|
<SColor>ButtonTextSColor</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 />
|
||||||
|
</Text>
|
||||||
|
<!--<Reflection> If exists:-->
|
||||||
|
<!-- <Space>: Reflection Space-->
|
||||||
|
<!-- <Height>: Reflection Height-->
|
||||||
|
<!--<SReflection> If exists:-->
|
||||||
|
<!-- <Space>: Reflection Space of selected button-->
|
||||||
|
<!-- <Height>: Reflection Height of selected button-->
|
||||||
|
</ButtonRoundsScrollDown>
|
||||||
</PartyScreenChallengeMain>
|
</PartyScreenChallengeMain>
|
||||||
</root>
|
</root>
|
||||||
@@ -49,7 +49,8 @@ namespace Vocaluxe.PartyModes
|
|||||||
const string ButtonPopupNo = "ButtonPopupNo";
|
const string ButtonPopupNo = "ButtonPopupNo";
|
||||||
const string ButtonPlayerScrollUp = "ButtonPlayerScrollUp";
|
const string ButtonPlayerScrollUp = "ButtonPlayerScrollUp";
|
||||||
const string ButtonPlayerScrollDown = "ButtonPlayerScrollDown";
|
const string ButtonPlayerScrollDown = "ButtonPlayerScrollDown";
|
||||||
|
const string ButtonRoundsScrollUp = "ButtonRoundsScrollUp";
|
||||||
|
const string ButtonRoundsScrollDown = "ButtonRoundsScrollDown";
|
||||||
|
|
||||||
const string StaticPopupBG = "StaticPopupBG";
|
const string StaticPopupBG = "StaticPopupBG";
|
||||||
const string StaticNextPlayer = "StaticNextPlayer";
|
const string StaticNextPlayer = "StaticNextPlayer";
|
||||||
@@ -68,6 +69,8 @@ namespace Vocaluxe.PartyModes
|
|||||||
private SRectF PlayerTableScrollArea;
|
private SRectF PlayerTableScrollArea;
|
||||||
private int RoundsTableOffset = 0;
|
private int RoundsTableOffset = 0;
|
||||||
private int PlayerTableOffset = 0;
|
private int PlayerTableOffset = 0;
|
||||||
|
private int NumPlayerVisible = 10;
|
||||||
|
private int NumRoundsVisible = 3;
|
||||||
|
|
||||||
public PartyScreenChallengeMain()
|
public PartyScreenChallengeMain()
|
||||||
{
|
{
|
||||||
@@ -81,7 +84,7 @@ namespace Vocaluxe.PartyModes
|
|||||||
|
|
||||||
_ThemeName = "PartyScreenChallengeMain";
|
_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 };
|
||||||
_ThemeButtons = new string[] { ButtonNextRound, ButtonBack, ButtonExit, ButtonPopupYes, ButtonPopupNo, ButtonPlayerScrollDown, ButtonPlayerScrollUp };
|
_ThemeButtons = new string[] { ButtonNextRound, ButtonBack, ButtonExit, ButtonPopupYes, ButtonPopupNo, ButtonPlayerScrollDown, ButtonPlayerScrollUp, ButtonRoundsScrollDown, ButtonRoundsScrollUp };
|
||||||
_ThemeStatics = new string[] { StaticPopupBG, StaticNextPlayer };
|
_ThemeStatics = new string[] { StaticPopupBG, StaticNextPlayer };
|
||||||
_ScreenVersion = ScreenVersion;
|
_ScreenVersion = ScreenVersion;
|
||||||
}
|
}
|
||||||
@@ -92,7 +95,7 @@ namespace Vocaluxe.PartyModes
|
|||||||
|
|
||||||
GameState = new DataToScreenMain();
|
GameState = new DataToScreenMain();
|
||||||
BuildPlayerTable();
|
BuildPlayerTable();
|
||||||
|
CreateRoundsTable();
|
||||||
NextPlayerTexts = new List<CText>();
|
NextPlayerTexts = new List<CText>();
|
||||||
NextPlayerStatics = new List<CStatic>();
|
NextPlayerStatics = new List<CStatic>();
|
||||||
|
|
||||||
@@ -153,6 +156,14 @@ namespace Vocaluxe.PartyModes
|
|||||||
Back();
|
Back();
|
||||||
if (Buttons[htButtons(ButtonExit)].Selected && GameState.CurrentRoundNr > 1)
|
if (Buttons[htButtons(ButtonExit)].Selected && GameState.CurrentRoundNr > 1)
|
||||||
ShowPopup(true);
|
ShowPopup(true);
|
||||||
|
if (Buttons[htButtons(ButtonPlayerScrollUp)].Selected)
|
||||||
|
ScrollPlayerTable(-1);
|
||||||
|
if (Buttons[htButtons(ButtonPlayerScrollDown)].Selected)
|
||||||
|
ScrollPlayerTable(1);
|
||||||
|
if (Buttons[htButtons(ButtonRoundsScrollUp)].Selected)
|
||||||
|
ScrollRoundsTable(-1);
|
||||||
|
if (Buttons[htButtons(ButtonRoundsScrollDown)].Selected)
|
||||||
|
ScrollRoundsTable(1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -181,6 +192,14 @@ namespace Vocaluxe.PartyModes
|
|||||||
Back();
|
Back();
|
||||||
if (Buttons[htButtons(ButtonExit)].Selected && GameState.CurrentRoundNr > 1)
|
if (Buttons[htButtons(ButtonExit)].Selected && GameState.CurrentRoundNr > 1)
|
||||||
ShowPopup(true);
|
ShowPopup(true);
|
||||||
|
if (Buttons[htButtons(ButtonPlayerScrollUp)].Selected)
|
||||||
|
ScrollPlayerTable(-1);
|
||||||
|
if (Buttons[htButtons(ButtonPlayerScrollDown)].Selected)
|
||||||
|
ScrollPlayerTable(1);
|
||||||
|
if (Buttons[htButtons(ButtonRoundsScrollUp)].Selected)
|
||||||
|
ScrollRoundsTable(-1);
|
||||||
|
if (Buttons[htButtons(ButtonRoundsScrollDown)].Selected)
|
||||||
|
ScrollRoundsTable(1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -209,12 +228,15 @@ namespace Vocaluxe.PartyModes
|
|||||||
{
|
{
|
||||||
base.OnShow();
|
base.OnShow();
|
||||||
|
|
||||||
UpdatePlayerTable(PlayerTableOffset);
|
PlayerTableOffset = 0;
|
||||||
|
RoundsTableOffset = 0;
|
||||||
|
|
||||||
|
UpdatePlayerTable();
|
||||||
UpdateNextPlayerPositions();
|
UpdateNextPlayerPositions();
|
||||||
UpdateNextPlayerContents();
|
UpdateNextPlayerContents();
|
||||||
if(GameState.CurrentRoundNr == 1 || RoundsTable == null)
|
if (GameState.CurrentRoundNr == 1)
|
||||||
BuildRoundsTable();
|
BuildRoundsTable();
|
||||||
UpdateRoundsTable(RoundsTableOffset);
|
UpdateRoundsTable();
|
||||||
|
|
||||||
if (GameState.CurrentRoundNr == 1)
|
if (GameState.CurrentRoundNr == 1)
|
||||||
{
|
{
|
||||||
@@ -328,23 +350,11 @@ namespace Vocaluxe.PartyModes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BuildRoundsTable()
|
private void CreateRoundsTable()
|
||||||
{
|
{
|
||||||
int NumRoundsVisible = 3;
|
|
||||||
int NumPlayerInOneRow = 3;
|
|
||||||
if (GameState.NumPlayerAtOnce <= NumPlayerInOneRow)
|
|
||||||
NumRoundsVisible = 5;
|
|
||||||
if (NumRoundsVisible > GameState.Combs.Count)
|
|
||||||
NumRoundsVisible = GameState.Combs.Count;
|
|
||||||
|
|
||||||
float x = Texts[htTexts(TextRoundNumber)].X;
|
|
||||||
float y = Texts[htTexts(TextRoundNumber)].Y;
|
|
||||||
|
|
||||||
float delta = Texts[htTexts(TextRoundNumber)].Height;
|
|
||||||
|
|
||||||
//Create lists
|
//Create lists
|
||||||
RoundsTable = new List<RoundsTableRow>();
|
RoundsTable = new List<RoundsTableRow>();
|
||||||
for (int i = 0; i < NumRoundsVisible; i++)
|
for (int i = 0; i < 5; i++)
|
||||||
{
|
{
|
||||||
RoundsTableRow rtr = new RoundsTableRow();
|
RoundsTableRow rtr = new RoundsTableRow();
|
||||||
rtr.TextPlayer = new List<CText>();
|
rtr.TextPlayer = new List<CText>();
|
||||||
@@ -356,12 +366,45 @@ namespace Vocaluxe.PartyModes
|
|||||||
{
|
{
|
||||||
//Round-number
|
//Round-number
|
||||||
CText text = GetNewText(Texts[htTexts(TextRoundNumber)]);
|
CText text = GetNewText(Texts[htTexts(TextRoundNumber)]);
|
||||||
text.X = x;
|
|
||||||
text.Y = y;
|
|
||||||
text.Text = (round + 1) + ")";
|
|
||||||
AddText(text);
|
AddText(text);
|
||||||
RoundsTable[round].Number = text;
|
RoundsTable[round].Number = text;
|
||||||
int NumInnerRows = (int) Math.Ceiling(GameState.NumPlayerAtOnce / ((double)NumPlayerInOneRow));
|
for (int row = 0; row < 2; row++)
|
||||||
|
{
|
||||||
|
for (int column = 0; column < 3; column++)
|
||||||
|
{
|
||||||
|
//Player
|
||||||
|
text = GetNewText(Texts[htTexts(TextRoundPlayer)]);
|
||||||
|
AddText(text);
|
||||||
|
RoundsTable[round].TextPlayer.Add(text);
|
||||||
|
//Score
|
||||||
|
text = GetNewText(Texts[htTexts(TextRoundScore)]);
|
||||||
|
AddText(text);
|
||||||
|
RoundsTable[round].TextScores.Add(text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void BuildRoundsTable()
|
||||||
|
{
|
||||||
|
int NumPlayerInOneRow = 3;
|
||||||
|
if (GameState.NumPlayerAtOnce <= NumPlayerInOneRow)
|
||||||
|
NumRoundsVisible = 5;
|
||||||
|
if (NumRoundsVisible > GameState.Combs.Count)
|
||||||
|
NumRoundsVisible = GameState.Combs.Count;
|
||||||
|
|
||||||
|
float x = Texts[htTexts(TextRoundNumber)].X;
|
||||||
|
float y = Texts[htTexts(TextRoundNumber)].Y;
|
||||||
|
|
||||||
|
float delta = Texts[htTexts(TextRoundNumber)].Height;
|
||||||
|
|
||||||
|
//Update statics and texts for rounds
|
||||||
|
for (int round = 0; round < RoundsTable.Count; round++)
|
||||||
|
{
|
||||||
|
//Round-number
|
||||||
|
RoundsTable[round].Number.X = x;
|
||||||
|
RoundsTable[round].Number.Y = y;
|
||||||
|
int NumInnerRows = (int)Math.Ceiling(GameState.NumPlayerAtOnce / ((double)NumPlayerInOneRow));
|
||||||
for (int row = 0; row < NumInnerRows; row++)
|
for (int row = 0; row < NumInnerRows; row++)
|
||||||
{
|
{
|
||||||
int num = (row + 1) * NumPlayerInOneRow;
|
int num = (row + 1) * NumPlayerInOneRow;
|
||||||
@@ -371,58 +414,66 @@ namespace Vocaluxe.PartyModes
|
|||||||
num = GameState.NumPlayerAtOnce;
|
num = GameState.NumPlayerAtOnce;
|
||||||
NumPlayerInThisRow = GameState.NumPlayerAtOnce - (row * NumPlayerInOneRow);
|
NumPlayerInThisRow = GameState.NumPlayerAtOnce - (row * NumPlayerInOneRow);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int column = row * NumPlayerInOneRow; column < num; column++)
|
for (int column = row * NumPlayerInOneRow; column < num; column++)
|
||||||
{
|
{
|
||||||
//Player
|
//Player
|
||||||
float _x = x + 15 + (_Base.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow * (column - row * NumPlayerInOneRow) + ((_Base.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow) / 2;
|
float _x = x + 15 + (_Base.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow * (column - row * NumPlayerInOneRow) + ((_Base.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow) / 2;
|
||||||
float maxw = ((_Base.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow)/2 - 5;
|
float maxw = ((_Base.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow) / 2 - 5;
|
||||||
text = GetNewText(Texts[htTexts(TextRoundNumber)]);
|
RoundsTable[round].TextPlayer[column].X = _x;
|
||||||
text.X = _x;
|
RoundsTable[round].TextPlayer[column].Y = y;
|
||||||
text.Y = y;
|
RoundsTable[round].TextPlayer[column].MaxWidth = maxw;
|
||||||
text.MaxWidth = maxw;
|
|
||||||
AddText(text);
|
|
||||||
RoundsTable[round].TextPlayer.Add(text);
|
|
||||||
//Score
|
//Score
|
||||||
text = GetNewText(Texts[htTexts(TextRoundNumber)]);
|
RoundsTable[round].TextScores[column] = RoundsTable[round].TextScores[column];
|
||||||
text.X = _x;
|
RoundsTable[round].TextScores[column].X = _x;
|
||||||
text.Y = y + delta;
|
RoundsTable[round].TextScores[column].Y = y + delta;
|
||||||
text.MaxWidth = maxw;
|
RoundsTable[round].TextScores[column].MaxWidth = maxw;
|
||||||
AddText(text);
|
|
||||||
RoundsTable[round].TextScores.Add(text);
|
|
||||||
}
|
}
|
||||||
y = y + delta + delta;
|
y = y + delta + delta;
|
||||||
}
|
}
|
||||||
y = y + delta/2;
|
y = y + delta / 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateRoundsTable(int Offset)
|
private void UpdateRoundsTable()
|
||||||
{
|
{
|
||||||
SProfile[] profile = _Base.Profiles.GetProfiles();
|
SProfile[] profile = _Base.Profiles.GetProfiles();
|
||||||
for (int i = 0; i < RoundsTable.Count; i++)
|
for (int i = 0; i < RoundsTable.Count; i++)
|
||||||
{
|
{
|
||||||
for(int p = 0; p < RoundsTable[i].TextPlayer.Count; p++)
|
for(int p = 0; p < RoundsTable[i].TextPlayer.Count; p++)
|
||||||
{
|
{
|
||||||
RoundsTable[i].Number.Text = (i + 1 + Offset).ToString();
|
if (GameState.Combs[i + RoundsTableOffset].Player.Count > p)
|
||||||
int pID = GameState.ProfileIDs[GameState.Combs[i + Offset].Player[p]];
|
{
|
||||||
RoundsTable[i].TextPlayer[p].Text = profile[pID].PlayerName+"";
|
RoundsTable[i].Number.Visible = true;
|
||||||
if ((GameState.CurrentRoundNr - 1) > i)
|
RoundsTable[i].TextPlayer[p].Visible = true;
|
||||||
RoundsTable[i].TextScores[p].Text = GameState.Results[i + Offset, p].ToString();
|
RoundsTable[i].TextScores[p].Visible = true;
|
||||||
|
RoundsTable[i].Number.Text = (i + 1 + RoundsTableOffset).ToString() + ")";
|
||||||
|
int pID = GameState.ProfileIDs[GameState.Combs[i + RoundsTableOffset].Player[p]];
|
||||||
|
RoundsTable[i].TextPlayer[p].Text = profile[pID].PlayerName;
|
||||||
|
if ((GameState.CurrentRoundNr - 1) > i)
|
||||||
|
RoundsTable[i].TextScores[p].Text = GameState.Results[i + RoundsTableOffset, p].ToString();
|
||||||
|
else
|
||||||
|
RoundsTable[i].TextScores[p].Text = "";
|
||||||
|
}
|
||||||
else
|
else
|
||||||
RoundsTable[i].TextScores[p].Text = "";
|
{
|
||||||
|
RoundsTable[i].TextPlayer[p].Visible = false;
|
||||||
|
RoundsTable[i].TextScores[p].Visible = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (GameState.Combs.Count < i + RoundsTableOffset)
|
||||||
|
{
|
||||||
|
RoundsTable[i].Number.Visible = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BuildPlayerTable()
|
private void BuildPlayerTable()
|
||||||
{
|
{
|
||||||
int NumPlayerVisible = 10;
|
|
||||||
|
|
||||||
PlayerTable = new List<TableRow>();
|
PlayerTable = new List<TableRow>();
|
||||||
float delta = Texts[htTexts(TextPosition)].Height * 1.2f;
|
float delta = Texts[htTexts(TextPosition)].Height * 1.2f;
|
||||||
|
|
||||||
for (int i = 0; i < NumPlayerVisible; i++)
|
for (int i = 0; i < 10; i++)
|
||||||
{
|
{
|
||||||
TableRow row = new TableRow();
|
TableRow row = new TableRow();
|
||||||
|
|
||||||
@@ -460,15 +511,15 @@ namespace Vocaluxe.PartyModes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdatePlayerTable(int Offset)
|
private void UpdatePlayerTable()
|
||||||
{
|
{
|
||||||
SProfile[] profiles = _Base.Profiles.GetProfiles();
|
SProfile[] profiles = _Base.Profiles.GetProfiles();
|
||||||
|
|
||||||
for (int i = 0; i < PlayerTable.Count; i++)
|
for (int i = 0; i < PlayerTable.Count; i++)
|
||||||
{
|
{
|
||||||
TableRow row = PlayerTable[i+Offset];
|
TableRow row = PlayerTable[i];
|
||||||
|
|
||||||
if (i+Offset < GameState.ResultTable.Count)
|
if (i+PlayerTableOffset < GameState.ResultTable.Count)
|
||||||
{
|
{
|
||||||
row.Pos.Visible = true;
|
row.Pos.Visible = true;
|
||||||
row.Name.Visible = true;
|
row.Name.Visible = true;
|
||||||
@@ -477,11 +528,12 @@ namespace Vocaluxe.PartyModes
|
|||||||
row.SingPoints.Visible = true;
|
row.SingPoints.Visible = true;
|
||||||
row.GamePoints.Visible = true;
|
row.GamePoints.Visible = true;
|
||||||
|
|
||||||
row.Name.Text = profiles[GameState.ResultTable[i+Offset].PlayerID].PlayerName;
|
row.Pos.Text = (i + 1 + PlayerTableOffset).ToString();
|
||||||
row.Rounds.Text = GameState.ResultTable[i+Offset].NumRounds.ToString();
|
row.Name.Text = profiles[GameState.ResultTable[i+PlayerTableOffset].PlayerID].PlayerName;
|
||||||
row.Won.Text = GameState.ResultTable[i+Offset].NumWon.ToString();
|
row.Rounds.Text = GameState.ResultTable[i+PlayerTableOffset].NumRounds.ToString();
|
||||||
row.SingPoints.Text = GameState.ResultTable[i+Offset].SumSingPoints.ToString();
|
row.Won.Text = GameState.ResultTable[i+PlayerTableOffset].NumWon.ToString();
|
||||||
row.GamePoints.Text = GameState.ResultTable[i+Offset].NumGamePoints.ToString();
|
row.SingPoints.Text = GameState.ResultTable[i+PlayerTableOffset].SumSingPoints.ToString();
|
||||||
|
row.GamePoints.Text = GameState.ResultTable[i+PlayerTableOffset].NumGamePoints.ToString();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -494,5 +546,33 @@ namespace Vocaluxe.PartyModes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ScrollPlayerTable(int Offset)
|
||||||
|
{
|
||||||
|
if (Offset < 0 && PlayerTableOffset + Offset >= 0)
|
||||||
|
PlayerTableOffset += Offset;
|
||||||
|
else if (Offset < 0 && PlayerTableOffset + Offset < 0)
|
||||||
|
PlayerTableOffset = 0;
|
||||||
|
else if (Offset > 0 && PlayerTableOffset + Offset <= GameState.ProfileIDs.Count - NumPlayerVisible)
|
||||||
|
PlayerTableOffset += Offset;
|
||||||
|
else if (Offset > 0 && PlayerTableOffset + Offset > GameState.ProfileIDs.Count - NumPlayerVisible)
|
||||||
|
PlayerTableOffset = GameState.ProfileIDs.Count - NumPlayerVisible;
|
||||||
|
|
||||||
|
UpdatePlayerTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ScrollRoundsTable(int Offset)
|
||||||
|
{
|
||||||
|
if (Offset < 0 && RoundsTableOffset + Offset >= 0)
|
||||||
|
RoundsTableOffset += Offset;
|
||||||
|
else if (Offset < 0 && RoundsTableOffset + Offset < 0)
|
||||||
|
RoundsTableOffset = 0;
|
||||||
|
else if (Offset > 0 && RoundsTableOffset + Offset <= GameState.Combs.Count - NumRoundsVisible)
|
||||||
|
RoundsTableOffset += Offset;
|
||||||
|
else if (Offset > 0 && RoundsTableOffset + Offset > GameState.Combs.Count - NumRoundsVisible)
|
||||||
|
RoundsTableOffset = GameState.Combs.Count - NumRoundsVisible;
|
||||||
|
|
||||||
|
UpdateRoundsTable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user