Removed duplicate code in CMenu
This commit is contained in:
1 parent
d1705147e0
commit
da889c9d40
31 files changed
+1595
-1964
No files matched your search
@@ -88,10 +88,10 @@ namespace Vocaluxe.PartyModes
|
||||
case Keys.Enter:
|
||||
UpdateSlides();
|
||||
|
||||
if (Buttons[htButtons(ButtonBack)].Selected)
|
||||
if (Buttons[ButtonBack].Selected)
|
||||
Back();
|
||||
|
||||
if (Buttons[htButtons(ButtonNext)].Selected)
|
||||
if (Buttons[ButtonNext].Selected)
|
||||
Next();
|
||||
break;
|
||||
|
||||
@@ -114,10 +114,10 @@ namespace Vocaluxe.PartyModes
|
||||
if (MouseEvent.LB && IsMouseOver(MouseEvent))
|
||||
{
|
||||
UpdateSlides();
|
||||
if (Buttons[htButtons(ButtonBack)].Selected)
|
||||
if (Buttons[ButtonBack].Selected)
|
||||
Back();
|
||||
|
||||
if (Buttons[htButtons(ButtonNext)].Selected)
|
||||
if (Buttons[ButtonNext].Selected)
|
||||
Next();
|
||||
}
|
||||
|
||||
@@ -161,12 +161,12 @@ namespace Vocaluxe.PartyModes
|
||||
private void RebuildSlides()
|
||||
{
|
||||
// build num player slide (min player ... max player);
|
||||
SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Clear();
|
||||
SelectSlides[SelectSlideNumPlayers].Clear();
|
||||
for (int i = _PartyMode.GetMinPlayer(); i <= _PartyMode.GetMaxPlayer(); i++)
|
||||
{
|
||||
SelectSlides[htSelectSlides(SelectSlideNumPlayers)].AddValue(i.ToString());
|
||||
SelectSlides[SelectSlideNumPlayers].AddValue(i.ToString());
|
||||
}
|
||||
SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Selection = Data.ScreenConfig.NumPlayer - _PartyMode.GetMinPlayer();
|
||||
SelectSlides[SelectSlideNumPlayers].Selection = Data.ScreenConfig.NumPlayer - _PartyMode.GetMinPlayer();
|
||||
|
||||
UpdateMicsAtOnce();
|
||||
SetRoundSteps();
|
||||
@@ -177,9 +177,9 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
int player = Data.ScreenConfig.NumPlayer;
|
||||
int mics = Data.ScreenConfig.NumPlayerAtOnce;
|
||||
Data.ScreenConfig.NumPlayer = SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Selection + _PartyMode.GetMinPlayer();
|
||||
Data.ScreenConfig.NumPlayerAtOnce = SelectSlides[htSelectSlides(SelectSlideNumMics)].Selection + _PartyMode.GetMinPlayer();
|
||||
Data.ScreenConfig.NumRounds = (SelectSlides[htSelectSlides(SelectSlideNumRounds)].Selection + 1) * _RoundSteps;
|
||||
Data.ScreenConfig.NumPlayer = SelectSlides[SelectSlideNumPlayers].Selection + _PartyMode.GetMinPlayer();
|
||||
Data.ScreenConfig.NumPlayerAtOnce = SelectSlides[SelectSlideNumMics].Selection + _PartyMode.GetMinPlayer();
|
||||
Data.ScreenConfig.NumRounds = (SelectSlides[SelectSlideNumRounds].Selection + 1) * _RoundSteps;
|
||||
|
||||
UpdateMicsAtOnce();
|
||||
SetRoundSteps();
|
||||
@@ -208,23 +208,23 @@ namespace Vocaluxe.PartyModes
|
||||
Data.ScreenConfig.NumPlayerAtOnce = MaxNum;
|
||||
|
||||
// build mics at once slide
|
||||
SelectSlides[htSelectSlides(SelectSlideNumMics)].Clear();
|
||||
SelectSlides[SelectSlideNumMics].Clear();
|
||||
for (int i = 1; i <= MaxNum; i++)
|
||||
{
|
||||
SelectSlides[htSelectSlides(SelectSlideNumMics)].AddValue(i.ToString());
|
||||
SelectSlides[SelectSlideNumMics].AddValue(i.ToString());
|
||||
}
|
||||
SelectSlides[htSelectSlides(SelectSlideNumMics)].Selection = Data.ScreenConfig.NumPlayerAtOnce - _PartyMode.GetMinPlayer();
|
||||
SelectSlides[SelectSlideNumMics].Selection = Data.ScreenConfig.NumPlayerAtOnce - _PartyMode.GetMinPlayer();
|
||||
}
|
||||
|
||||
private void UpdateSlideRounds()
|
||||
{
|
||||
// build num rounds slide
|
||||
SelectSlides[htSelectSlides(SelectSlideNumRounds)].Clear();
|
||||
SelectSlides[SelectSlideNumRounds].Clear();
|
||||
for (int i = _RoundSteps; i <= _MaxNumRounds; i += _RoundSteps)
|
||||
{
|
||||
SelectSlides[htSelectSlides(SelectSlideNumRounds)].AddValue(i.ToString());
|
||||
SelectSlides[SelectSlideNumRounds].AddValue(i.ToString());
|
||||
}
|
||||
SelectSlides[htSelectSlides(SelectSlideNumRounds)].Selection = Data.ScreenConfig.NumRounds / _RoundSteps - 1;
|
||||
SelectSlides[SelectSlideNumRounds].Selection = Data.ScreenConfig.NumRounds / _RoundSteps - 1;
|
||||
}
|
||||
|
||||
private void SetRoundSteps()
|
||||
|
||||
@@ -104,9 +104,9 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
for (int i = 0; i < _PartyMode.GetMaxPlayer(); i++)
|
||||
{
|
||||
NextPlayerTexts.Add(GetNewText(Texts[htTexts(TextNextPlayer)]));
|
||||
NextPlayerTexts.Add(GetNewText(Texts[TextNextPlayer]));
|
||||
AddText(NextPlayerTexts[NextPlayerTexts.Count - 1]);
|
||||
NextPlayerStatics.Add(GetNewStatic(Statics[htStatics(StaticNextPlayer)]));
|
||||
NextPlayerStatics.Add(GetNewStatic(Statics[StaticNextPlayer]));
|
||||
AddStatic(NextPlayerStatics[NextPlayerStatics.Count - 1]);
|
||||
}
|
||||
}
|
||||
@@ -153,26 +153,26 @@ namespace Vocaluxe.PartyModes
|
||||
case Keys.Enter:
|
||||
if (!ExitPopupVisible)
|
||||
{
|
||||
if (Buttons[htButtons(ButtonNextRound)].Selected)
|
||||
if (Buttons[ButtonNextRound].Selected)
|
||||
NextRound();
|
||||
if (Buttons[htButtons(ButtonBack)].Selected && GameState.CurrentRoundNr == 1)
|
||||
if (Buttons[ButtonBack].Selected && GameState.CurrentRoundNr == 1)
|
||||
Back();
|
||||
if (Buttons[htButtons(ButtonExit)].Selected && GameState.CurrentRoundNr > 1)
|
||||
if (Buttons[ButtonExit].Selected && GameState.CurrentRoundNr > 1)
|
||||
ShowPopup(true);
|
||||
if (Buttons[htButtons(ButtonPlayerScrollUp)].Selected)
|
||||
if (Buttons[ButtonPlayerScrollUp].Selected)
|
||||
ScrollPlayerTable(-1);
|
||||
if (Buttons[htButtons(ButtonPlayerScrollDown)].Selected)
|
||||
if (Buttons[ButtonPlayerScrollDown].Selected)
|
||||
ScrollPlayerTable(1);
|
||||
if (Buttons[htButtons(ButtonRoundsScrollUp)].Selected)
|
||||
if (Buttons[ButtonRoundsScrollUp].Selected)
|
||||
ScrollRoundsTable(-1);
|
||||
if (Buttons[htButtons(ButtonRoundsScrollDown)].Selected)
|
||||
if (Buttons[ButtonRoundsScrollDown].Selected)
|
||||
ScrollRoundsTable(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Buttons[htButtons(ButtonPopupYes)].Selected)
|
||||
if (Buttons[ButtonPopupYes].Selected)
|
||||
EndParty();
|
||||
if (Buttons[htButtons(ButtonPopupNo)].Selected)
|
||||
if (Buttons[ButtonPopupNo].Selected)
|
||||
ShowPopup(false);
|
||||
}
|
||||
break;
|
||||
@@ -189,26 +189,26 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
if (!ExitPopupVisible)
|
||||
{
|
||||
if (Buttons[htButtons(ButtonNextRound)].Selected)
|
||||
if (Buttons[ButtonNextRound].Selected)
|
||||
NextRound();
|
||||
if (Buttons[htButtons(ButtonBack)].Selected && GameState.CurrentRoundNr == 1)
|
||||
if (Buttons[ButtonBack].Selected && GameState.CurrentRoundNr == 1)
|
||||
Back();
|
||||
if (Buttons[htButtons(ButtonExit)].Selected && GameState.CurrentRoundNr > 1)
|
||||
if (Buttons[ButtonExit].Selected && GameState.CurrentRoundNr > 1)
|
||||
ShowPopup(true);
|
||||
if (Buttons[htButtons(ButtonPlayerScrollUp)].Selected)
|
||||
if (Buttons[ButtonPlayerScrollUp].Selected)
|
||||
ScrollPlayerTable(-1);
|
||||
if (Buttons[htButtons(ButtonPlayerScrollDown)].Selected)
|
||||
if (Buttons[ButtonPlayerScrollDown].Selected)
|
||||
ScrollPlayerTable(1);
|
||||
if (Buttons[htButtons(ButtonRoundsScrollUp)].Selected)
|
||||
if (Buttons[ButtonRoundsScrollUp].Selected)
|
||||
ScrollRoundsTable(-1);
|
||||
if (Buttons[htButtons(ButtonRoundsScrollDown)].Selected)
|
||||
if (Buttons[ButtonRoundsScrollDown].Selected)
|
||||
ScrollRoundsTable(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Buttons[htButtons(ButtonPopupYes)].Selected)
|
||||
if (Buttons[ButtonPopupYes].Selected)
|
||||
EndParty();
|
||||
if (Buttons[htButtons(ButtonPopupNo)].Selected)
|
||||
if (Buttons[ButtonPopupNo].Selected)
|
||||
ShowPopup(false);
|
||||
}
|
||||
}
|
||||
@@ -253,29 +253,29 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
if (GameState.CurrentRoundNr == 1)
|
||||
{
|
||||
Buttons[htButtons(ButtonBack)].Visible = true;
|
||||
Buttons[htButtons(ButtonExit)].Visible = false;
|
||||
Buttons[ButtonBack].Visible = true;
|
||||
Buttons[ButtonExit].Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Buttons[htButtons(ButtonBack)].Visible = false;
|
||||
Buttons[htButtons(ButtonExit)].Visible = true;
|
||||
Buttons[ButtonBack].Visible = false;
|
||||
Buttons[ButtonExit].Visible = true;
|
||||
}
|
||||
|
||||
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)]);
|
||||
Buttons[ButtonNextRound].Visible = true;
|
||||
Texts[TextFinishMessage].Visible = false;
|
||||
Texts[TextFinishPlayerWin].Visible = false;
|
||||
SetInteractionToButton(Buttons[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)]);
|
||||
Buttons[ButtonNextRound].Visible = false;
|
||||
Texts[TextFinishMessage].Visible = true;
|
||||
Texts[TextFinishPlayerWin].Visible = true;
|
||||
Texts[TextFinishPlayerWin].Text = GetPlayerWinString();
|
||||
SetInteractionToButton(Buttons[ButtonExit]);
|
||||
}
|
||||
|
||||
ShowPopup(false);
|
||||
@@ -313,13 +313,13 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
ExitPopupVisible = Visible;
|
||||
|
||||
Statics[htStatics(StaticPopupBG)].Visible = ExitPopupVisible;
|
||||
Texts[htTexts(TextPopupReallyExit)].Visible = ExitPopupVisible;
|
||||
Buttons[htButtons(ButtonPopupYes)].Visible = ExitPopupVisible;
|
||||
Buttons[htButtons(ButtonPopupNo)].Visible = ExitPopupVisible;
|
||||
Statics[StaticPopupBG].Visible = ExitPopupVisible;
|
||||
Texts[TextPopupReallyExit].Visible = ExitPopupVisible;
|
||||
Buttons[ButtonPopupYes].Visible = ExitPopupVisible;
|
||||
Buttons[ButtonPopupNo].Visible = ExitPopupVisible;
|
||||
|
||||
if (ExitPopupVisible)
|
||||
SetInteractionToButton(Buttons[htButtons(ButtonPopupNo)]);
|
||||
SetInteractionToButton(Buttons[ButtonPopupNo]);
|
||||
}
|
||||
|
||||
private void Back()
|
||||
@@ -331,7 +331,7 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void UpdateNextPlayerPositions()
|
||||
{
|
||||
float x = CBase.Settings.GetRenderW()/2 - ((GameState.NumPlayerAtOnce * Statics[htStatics(StaticNextPlayer)].Rect.W) + ((GameState.NumPlayerAtOnce-1) * 15))/2;
|
||||
float x = CBase.Settings.GetRenderW()/2 - ((GameState.NumPlayerAtOnce * Statics[StaticNextPlayer].Rect.W) + ((GameState.NumPlayerAtOnce-1) * 15))/2;
|
||||
float static_y = 590;
|
||||
float text_y = 550;
|
||||
for (int i = 0; i < GameState.NumPlayerAtOnce; i++)
|
||||
@@ -341,11 +341,11 @@ namespace Vocaluxe.PartyModes
|
||||
NextPlayerStatics[i].Rect.Y = static_y;
|
||||
NextPlayerStatics[i].Visible = true;
|
||||
//text
|
||||
NextPlayerTexts[i].X = x + Statics[htStatics(StaticNextPlayer)].Rect.W / 2;
|
||||
NextPlayerTexts[i].X = x + Statics[StaticNextPlayer].Rect.W / 2;
|
||||
NextPlayerTexts[i].Y = text_y;
|
||||
NextPlayerTexts[i].Visible = true;
|
||||
|
||||
x += Statics[htStatics(StaticNextPlayer)].Rect.W + 15;
|
||||
x += Statics[StaticNextPlayer].Rect.W + 15;
|
||||
}
|
||||
for (int i = GameState.NumPlayerAtOnce; i < _PartyMode.GetMaxPlayer(); i++)
|
||||
{
|
||||
@@ -358,7 +358,7 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
if (GameState.CurrentRoundNr <= GameState.Combs.Count)
|
||||
{
|
||||
Texts[htTexts(TextNextPlayerMessage)].Visible = true;
|
||||
Texts[TextNextPlayerMessage].Visible = true;
|
||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||
for (int i = 0; i < GameState.NumPlayerAtOnce; i++)
|
||||
{
|
||||
@@ -370,7 +370,7 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
else
|
||||
{
|
||||
Texts[htTexts(TextNextPlayerMessage)].Visible = false;
|
||||
Texts[TextNextPlayerMessage].Visible = false;
|
||||
for (int i = 0; i < GameState.NumPlayerAtOnce; i++)
|
||||
{
|
||||
NextPlayerStatics[i].Visible = false;
|
||||
@@ -394,7 +394,7 @@ namespace Vocaluxe.PartyModes
|
||||
for (int round = 0; round < RoundsTable.Count; round++)
|
||||
{
|
||||
//Round-number
|
||||
CText text = GetNewText(Texts[htTexts(TextRoundNumber)]);
|
||||
CText text = GetNewText(Texts[TextRoundNumber]);
|
||||
AddText(text);
|
||||
RoundsTable[round].Number = text;
|
||||
for (int row = 0; row < 2; row++)
|
||||
@@ -402,11 +402,11 @@ namespace Vocaluxe.PartyModes
|
||||
for (int column = 0; column < 3; column++)
|
||||
{
|
||||
//Player
|
||||
text = GetNewText(Texts[htTexts(TextRoundPlayer)]);
|
||||
text = GetNewText(Texts[TextRoundPlayer]);
|
||||
AddText(text);
|
||||
RoundsTable[round].TextPlayer.Add(text);
|
||||
//Score
|
||||
text = GetNewText(Texts[htTexts(TextRoundScore)]);
|
||||
text = GetNewText(Texts[TextRoundScore]);
|
||||
AddText(text);
|
||||
RoundsTable[round].TextScores.Add(text);
|
||||
}
|
||||
@@ -427,14 +427,14 @@ namespace Vocaluxe.PartyModes
|
||||
if (NumRoundsVisible > GameState.Combs.Count)
|
||||
NumRoundsVisible = GameState.Combs.Count;
|
||||
|
||||
float x = Texts[htTexts(TextRoundNumber)].X;
|
||||
float y = Texts[htTexts(TextRoundNumber)].Y;
|
||||
float x = Texts[TextRoundNumber].X;
|
||||
float y = Texts[TextRoundNumber].Y;
|
||||
|
||||
RoundsTableScrollArea.X = x;
|
||||
RoundsTableScrollArea.Y = y;
|
||||
RoundsTableScrollArea.W = CBase.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20;
|
||||
RoundsTableScrollArea.W = CBase.Settings.GetRenderW() - Texts[TextRoundNumber].X - 20;
|
||||
|
||||
float delta = Texts[htTexts(TextRoundNumber)].Height;
|
||||
float delta = Texts[TextRoundNumber].Height;
|
||||
|
||||
//Update statics and texts for rounds
|
||||
for (int round = 0; round < RoundsTable.Count; round++)
|
||||
@@ -455,8 +455,8 @@ namespace Vocaluxe.PartyModes
|
||||
for (int column = row * NumPlayerInOneRow; column < num; column++)
|
||||
{
|
||||
//Player
|
||||
float _x = x + 15 + (CBase.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow * (column - row * NumPlayerInOneRow) + ((CBase.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow) / 2;
|
||||
float maxw = ((CBase.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow) / 2 - 5;
|
||||
float _x = x + 15 + (CBase.Settings.GetRenderW() - Texts[TextRoundNumber].X - 20) / NumPlayerInThisRow * (column - row * NumPlayerInOneRow) + ((CBase.Settings.GetRenderW() - Texts[TextRoundNumber].X - 20) / NumPlayerInThisRow) / 2;
|
||||
float maxw = ((CBase.Settings.GetRenderW() - Texts[TextRoundNumber].X - 20) / NumPlayerInThisRow) / 2 - 5;
|
||||
RoundsTable[round].TextPlayer[column].X = _x;
|
||||
RoundsTable[round].TextPlayer[column].Y = y;
|
||||
RoundsTable[round].TextPlayer[column].MaxWidth = maxw;
|
||||
@@ -510,19 +510,19 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
}
|
||||
|
||||
Buttons[htButtons(ButtonRoundsScrollUp)].Visible = RoundsTableOffset > 0;
|
||||
Buttons[htButtons(ButtonRoundsScrollDown)].Visible = GameState.Combs.Count - NumRoundsVisible - RoundsTableOffset > 0;
|
||||
Buttons[ButtonRoundsScrollUp].Visible = RoundsTableOffset > 0;
|
||||
Buttons[ButtonRoundsScrollDown].Visible = GameState.Combs.Count - NumRoundsVisible - RoundsTableOffset > 0;
|
||||
}
|
||||
|
||||
private void BuildPlayerTable()
|
||||
{
|
||||
PlayerTableScrollArea = new SRectF();
|
||||
PlayerTableScrollArea.X = Texts[htTexts(TextPosition)].X;
|
||||
PlayerTableScrollArea.Y = Texts[htTexts(TextPosition)].Y;
|
||||
PlayerTableScrollArea.W = Texts[htTexts(TextGamePoints)].X - Texts[htTexts(TextPosition)].X;
|
||||
PlayerTableScrollArea.X = Texts[TextPosition].X;
|
||||
PlayerTableScrollArea.Y = Texts[TextPosition].Y;
|
||||
PlayerTableScrollArea.W = Texts[TextGamePoints].X - Texts[TextPosition].X;
|
||||
|
||||
PlayerTable = new List<TableRow>();
|
||||
float delta = Texts[htTexts(TextPosition)].Height * 1.2f;
|
||||
float delta = Texts[TextPosition].Height * 1.2f;
|
||||
|
||||
float h = 0;
|
||||
|
||||
@@ -530,12 +530,12 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
TableRow row = new TableRow();
|
||||
|
||||
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.SingPoints = GetNewText(Texts[htTexts(TextSingPoints)]);
|
||||
row.GamePoints = GetNewText(Texts[htTexts(TextGamePoints)]);
|
||||
row.Pos = GetNewText(Texts[TextPosition]);
|
||||
row.Name = GetNewText(Texts[TextPlayerName]);
|
||||
row.Rounds = GetNewText(Texts[TextNumPlayed]);
|
||||
row.Won = GetNewText(Texts[TextWon]);
|
||||
row.SingPoints = GetNewText(Texts[TextSingPoints]);
|
||||
row.GamePoints = GetNewText(Texts[TextGamePoints]);
|
||||
|
||||
row.Pos.Y += delta * (i + 1);
|
||||
row.Name.Y += delta * (i + 1);
|
||||
@@ -602,8 +602,8 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
}
|
||||
|
||||
Buttons[htButtons(ButtonPlayerScrollUp)].Visible = PlayerTableOffset > 0;
|
||||
Buttons[htButtons(ButtonPlayerScrollDown)].Visible = GameState.ProfileIDs.Count - NumPlayerVisible - PlayerTableOffset > 0;
|
||||
Buttons[ButtonPlayerScrollUp].Visible = PlayerTableOffset > 0;
|
||||
Buttons[ButtonPlayerScrollDown].Visible = GameState.ProfileIDs.Count - NumPlayerVisible - PlayerTableOffset > 0;
|
||||
}
|
||||
|
||||
private void ScrollPlayerTable(int Offset)
|
||||
|
||||
@@ -131,10 +131,10 @@ namespace Vocaluxe.PartyModes
|
||||
break;
|
||||
|
||||
case Keys.Enter:
|
||||
if (Buttons[htButtons(ButtonBack)].Selected)
|
||||
if (Buttons[ButtonBack].Selected)
|
||||
Back();
|
||||
|
||||
if (Buttons[htButtons(ButtonNext)].Selected)
|
||||
if (Buttons[ButtonNext].Selected)
|
||||
Next();
|
||||
|
||||
if (!OnAdd())
|
||||
@@ -238,10 +238,10 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
if (MouseEvent.LB && IsMouseOver(MouseEvent))
|
||||
{
|
||||
if (Buttons[htButtons(ButtonBack)].Selected)
|
||||
if (Buttons[ButtonBack].Selected)
|
||||
Back();
|
||||
|
||||
if (Buttons[htButtons(ButtonNext)].Selected)
|
||||
if (Buttons[ButtonNext].Selected)
|
||||
Next();
|
||||
|
||||
if (!OnAdd())
|
||||
@@ -293,13 +293,13 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void AddButtonPlayerDestination()
|
||||
{
|
||||
Buttons[htButtons(ButtonPlayerDestination)].Visible = false;
|
||||
Buttons[ButtonPlayerDestination].Visible = false;
|
||||
PlayerDestinationButtons = new List<CButton>();
|
||||
int row = 0;
|
||||
int column = 0;
|
||||
for (int i = 1; i <= _PartyMode.GetMaxPlayer(); i++)
|
||||
{
|
||||
CButton b = GetNewButton(Buttons[htButtons(ButtonPlayerDestination)]);
|
||||
CButton b = GetNewButton(Buttons[ButtonPlayerDestination]);
|
||||
b.Rect.X = PlayerDestinationButtonsFirstX + column * (b.Rect.W + PlayerDestinationButtonsSpaceH);
|
||||
b.Rect.Y = PlayerDestinationButtonsFirstY + row * (b.Rect.H + PlayerDestinationButtonsSpaceW);
|
||||
PlayerDestinationButtons.Add(b);
|
||||
@@ -317,13 +317,13 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void AddButtonPlayerChoose()
|
||||
{
|
||||
Buttons[htButtons(ButtonPlayerChoose)].Visible = false;
|
||||
Buttons[ButtonPlayerChoose].Visible = false;
|
||||
PlayerChooseButtons = new List<CPlayerChooseButton>();
|
||||
int row = 0;
|
||||
int column = 0;
|
||||
for (int i = 1; i <= PlayerChooseButtonsNumH * PlayerChooseButtonsNumW; i++)
|
||||
{
|
||||
CButton b = GetNewButton(Buttons[htButtons(ButtonPlayerChoose)]);
|
||||
CButton b = GetNewButton(Buttons[ButtonPlayerChoose]);
|
||||
b.Rect.X = PlayerChooseButtonsFirstX + column * (b.Rect.W + PlayerChooseButtonsSpaceH);
|
||||
b.Rect.Y = PlayerChooseButtonsFirstY + row * (b.Rect.H + PlayerChooseButtonsSpaceW);
|
||||
CPlayerChooseButton pcb = new CPlayerChooseButton();
|
||||
@@ -379,10 +379,10 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
PlayerChooseButtons[i].ProfileID = -1;
|
||||
PlayerChooseButtons[i].Button.Text.Text = String.Empty;
|
||||
PlayerChooseButtons[i].Button.Texture = Buttons[htButtons(ButtonPlayerChoose)].Texture;
|
||||
PlayerChooseButtons[i].Button.STexture = Buttons[htButtons(ButtonPlayerChoose)].STexture;
|
||||
PlayerChooseButtons[i].Button.Color = Buttons[htButtons(ButtonPlayerChoose)].Color;
|
||||
PlayerChooseButtons[i].Button.SColor = Buttons[htButtons(ButtonPlayerChoose)].SColor;
|
||||
PlayerChooseButtons[i].Button.Texture = Buttons[ButtonPlayerChoose].Texture;
|
||||
PlayerChooseButtons[i].Button.STexture = Buttons[ButtonPlayerChoose].STexture;
|
||||
PlayerChooseButtons[i].Button.Color = Buttons[ButtonPlayerChoose].Color;
|
||||
PlayerChooseButtons[i].Button.SColor = Buttons[ButtonPlayerChoose].SColor;
|
||||
PlayerChooseButtons[i].Button.Enabled = false;
|
||||
}
|
||||
}
|
||||
@@ -448,10 +448,10 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayerDestinationButtons[i].Color = Buttons[htButtons(ButtonPlayerDestination)].Color;
|
||||
PlayerDestinationButtons[i].SColor = Buttons[htButtons(ButtonPlayerDestination)].SColor;
|
||||
PlayerDestinationButtons[i].Texture = Buttons[htButtons(ButtonPlayerDestination)].Texture;
|
||||
PlayerDestinationButtons[i].STexture = Buttons[htButtons(ButtonPlayerDestination)].STexture;
|
||||
PlayerDestinationButtons[i].Color = Buttons[ButtonPlayerDestination].Color;
|
||||
PlayerDestinationButtons[i].SColor = Buttons[ButtonPlayerDestination].SColor;
|
||||
PlayerDestinationButtons[i].Texture = Buttons[ButtonPlayerDestination].Texture;
|
||||
PlayerDestinationButtons[i].STexture = Buttons[ButtonPlayerDestination].STexture;
|
||||
PlayerDestinationButtons[i].Text.Text = String.Empty;
|
||||
PlayerDestinationButtons[i].Enabled = false;
|
||||
}
|
||||
@@ -462,11 +462,11 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
if (Data.ScreenNames.ProfileIDs.Count == NumPlayer)
|
||||
{
|
||||
Buttons[htButtons(ButtonNext)].Visible = true;
|
||||
SetInteractionToButton(Buttons[htButtons(ButtonNext)]);
|
||||
Buttons[ButtonNext].Visible = true;
|
||||
SetInteractionToButton(Buttons[ButtonNext]);
|
||||
}
|
||||
else
|
||||
Buttons[htButtons(ButtonNext)].Visible = false;
|
||||
Buttons[ButtonNext].Visible = false;
|
||||
}
|
||||
|
||||
private bool OnAdd()
|
||||
|
||||
@@ -88,10 +88,10 @@ namespace Vocaluxe.PartyModes
|
||||
case Keys.Enter:
|
||||
UpdateSlides();
|
||||
|
||||
if (Buttons[htButtons(ButtonBack)].Selected)
|
||||
if (Buttons[ButtonBack].Selected)
|
||||
Back();
|
||||
|
||||
if (Buttons[htButtons(ButtonNext)].Selected)
|
||||
if (Buttons[ButtonNext].Selected)
|
||||
Next();
|
||||
break;
|
||||
|
||||
@@ -114,10 +114,10 @@ namespace Vocaluxe.PartyModes
|
||||
if (MouseEvent.LB && IsMouseOver(MouseEvent))
|
||||
{
|
||||
UpdateSlides();
|
||||
if (Buttons[htButtons(ButtonBack)].Selected)
|
||||
if (Buttons[ButtonBack].Selected)
|
||||
Back();
|
||||
|
||||
if (Buttons[htButtons(ButtonNext)].Selected)
|
||||
if (Buttons[ButtonNext].Selected)
|
||||
Next();
|
||||
}
|
||||
|
||||
@@ -161,12 +161,12 @@ namespace Vocaluxe.PartyModes
|
||||
private void RebuildSlides()
|
||||
{
|
||||
// build num player slide (min player ... max player);
|
||||
SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Clear();
|
||||
SelectSlides[SelectSlideNumPlayers].Clear();
|
||||
for (int i = _PartyMode.GetMinPlayer(); i <= _PartyMode.GetMaxPlayer(); i++)
|
||||
{
|
||||
SelectSlides[htSelectSlides(SelectSlideNumPlayers)].AddValue(i.ToString());
|
||||
SelectSlides[SelectSlideNumPlayers].AddValue(i.ToString());
|
||||
}
|
||||
SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Selection = Data.ScreenConfig.NumPlayer - _PartyMode.GetMinPlayer();
|
||||
SelectSlides[SelectSlideNumPlayers].Selection = Data.ScreenConfig.NumPlayer - _PartyMode.GetMinPlayer();
|
||||
|
||||
UpdateMicsAtOnce();
|
||||
SetRoundSteps();
|
||||
@@ -177,9 +177,9 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
int player = Data.ScreenConfig.NumPlayer;
|
||||
int mics = Data.ScreenConfig.NumPlayerAtOnce;
|
||||
Data.ScreenConfig.NumPlayer = SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Selection + _PartyMode.GetMinPlayer();
|
||||
Data.ScreenConfig.NumPlayerAtOnce = SelectSlides[htSelectSlides(SelectSlideNumMics)].Selection + _PartyMode.GetMinPlayer();
|
||||
Data.ScreenConfig.NumRounds = (SelectSlides[htSelectSlides(SelectSlideNumRounds)].Selection + 1) * _RoundSteps;
|
||||
Data.ScreenConfig.NumPlayer = SelectSlides[SelectSlideNumPlayers].Selection + _PartyMode.GetMinPlayer();
|
||||
Data.ScreenConfig.NumPlayerAtOnce = SelectSlides[SelectSlideNumMics].Selection + _PartyMode.GetMinPlayer();
|
||||
Data.ScreenConfig.NumRounds = (SelectSlides[SelectSlideNumRounds].Selection + 1) * _RoundSteps;
|
||||
|
||||
UpdateMicsAtOnce();
|
||||
SetRoundSteps();
|
||||
@@ -208,23 +208,23 @@ namespace Vocaluxe.PartyModes
|
||||
Data.ScreenConfig.NumPlayerAtOnce = MaxNum;
|
||||
|
||||
// build mics at once slide
|
||||
SelectSlides[htSelectSlides(SelectSlideNumMics)].Clear();
|
||||
SelectSlides[SelectSlideNumMics].Clear();
|
||||
for (int i = 1; i <= MaxNum; i++)
|
||||
{
|
||||
SelectSlides[htSelectSlides(SelectSlideNumMics)].AddValue(i.ToString());
|
||||
SelectSlides[SelectSlideNumMics].AddValue(i.ToString());
|
||||
}
|
||||
SelectSlides[htSelectSlides(SelectSlideNumMics)].Selection = Data.ScreenConfig.NumPlayerAtOnce - _PartyMode.GetMinPlayer();
|
||||
SelectSlides[SelectSlideNumMics].Selection = Data.ScreenConfig.NumPlayerAtOnce - _PartyMode.GetMinPlayer();
|
||||
}
|
||||
|
||||
private void UpdateSlideRounds()
|
||||
{
|
||||
// build num rounds slide
|
||||
SelectSlides[htSelectSlides(SelectSlideNumRounds)].Clear();
|
||||
SelectSlides[SelectSlideNumRounds].Clear();
|
||||
for (int i = _RoundSteps; i <= _MaxNumRounds; i += _RoundSteps)
|
||||
{
|
||||
SelectSlides[htSelectSlides(SelectSlideNumRounds)].AddValue(i.ToString());
|
||||
SelectSlides[SelectSlideNumRounds].AddValue(i.ToString());
|
||||
}
|
||||
SelectSlides[htSelectSlides(SelectSlideNumRounds)].Selection = Data.ScreenConfig.NumRounds / _RoundSteps - 1;
|
||||
SelectSlides[SelectSlideNumRounds].Selection = Data.ScreenConfig.NumRounds / _RoundSteps - 1;
|
||||
}
|
||||
|
||||
private void SetRoundSteps()
|
||||
|
||||
@@ -104,9 +104,9 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
for (int i = 0; i < _PartyMode.GetMaxPlayer(); i++)
|
||||
{
|
||||
NextPlayerTexts.Add(GetNewText(Texts[htTexts(TextNextPlayer)]));
|
||||
NextPlayerTexts.Add(GetNewText(Texts[TextNextPlayer]));
|
||||
AddText(NextPlayerTexts[NextPlayerTexts.Count - 1]);
|
||||
NextPlayerStatics.Add(GetNewStatic(Statics[htStatics(StaticNextPlayer)]));
|
||||
NextPlayerStatics.Add(GetNewStatic(Statics[StaticNextPlayer]));
|
||||
AddStatic(NextPlayerStatics[NextPlayerStatics.Count - 1]);
|
||||
}
|
||||
}
|
||||
@@ -153,26 +153,26 @@ namespace Vocaluxe.PartyModes
|
||||
case Keys.Enter:
|
||||
if (!ExitPopupVisible)
|
||||
{
|
||||
if (Buttons[htButtons(ButtonNextRound)].Selected)
|
||||
if (Buttons[ButtonNextRound].Selected)
|
||||
NextRound();
|
||||
if (Buttons[htButtons(ButtonBack)].Selected && GameState.CurrentRoundNr == 1)
|
||||
if (Buttons[ButtonBack].Selected && GameState.CurrentRoundNr == 1)
|
||||
Back();
|
||||
if (Buttons[htButtons(ButtonExit)].Selected && GameState.CurrentRoundNr > 1)
|
||||
if (Buttons[ButtonExit].Selected && GameState.CurrentRoundNr > 1)
|
||||
ShowPopup(true);
|
||||
if (Buttons[htButtons(ButtonPlayerScrollUp)].Selected)
|
||||
if (Buttons[ButtonPlayerScrollUp].Selected)
|
||||
ScrollPlayerTable(-1);
|
||||
if (Buttons[htButtons(ButtonPlayerScrollDown)].Selected)
|
||||
if (Buttons[ButtonPlayerScrollDown].Selected)
|
||||
ScrollPlayerTable(1);
|
||||
if (Buttons[htButtons(ButtonRoundsScrollUp)].Selected)
|
||||
if (Buttons[ButtonRoundsScrollUp].Selected)
|
||||
ScrollRoundsTable(-1);
|
||||
if (Buttons[htButtons(ButtonRoundsScrollDown)].Selected)
|
||||
if (Buttons[ButtonRoundsScrollDown].Selected)
|
||||
ScrollRoundsTable(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Buttons[htButtons(ButtonPopupYes)].Selected)
|
||||
if (Buttons[ButtonPopupYes].Selected)
|
||||
EndParty();
|
||||
if (Buttons[htButtons(ButtonPopupNo)].Selected)
|
||||
if (Buttons[ButtonPopupNo].Selected)
|
||||
ShowPopup(false);
|
||||
}
|
||||
break;
|
||||
@@ -189,26 +189,26 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
if (!ExitPopupVisible)
|
||||
{
|
||||
if (Buttons[htButtons(ButtonNextRound)].Selected)
|
||||
if (Buttons[ButtonNextRound].Selected)
|
||||
NextRound();
|
||||
if (Buttons[htButtons(ButtonBack)].Selected && GameState.CurrentRoundNr == 1)
|
||||
if (Buttons[ButtonBack].Selected && GameState.CurrentRoundNr == 1)
|
||||
Back();
|
||||
if (Buttons[htButtons(ButtonExit)].Selected && GameState.CurrentRoundNr > 1)
|
||||
if (Buttons[ButtonExit].Selected && GameState.CurrentRoundNr > 1)
|
||||
ShowPopup(true);
|
||||
if (Buttons[htButtons(ButtonPlayerScrollUp)].Selected)
|
||||
if (Buttons[ButtonPlayerScrollUp].Selected)
|
||||
ScrollPlayerTable(-1);
|
||||
if (Buttons[htButtons(ButtonPlayerScrollDown)].Selected)
|
||||
if (Buttons[ButtonPlayerScrollDown].Selected)
|
||||
ScrollPlayerTable(1);
|
||||
if (Buttons[htButtons(ButtonRoundsScrollUp)].Selected)
|
||||
if (Buttons[ButtonRoundsScrollUp].Selected)
|
||||
ScrollRoundsTable(-1);
|
||||
if (Buttons[htButtons(ButtonRoundsScrollDown)].Selected)
|
||||
if (Buttons[ButtonRoundsScrollDown].Selected)
|
||||
ScrollRoundsTable(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Buttons[htButtons(ButtonPopupYes)].Selected)
|
||||
if (Buttons[ButtonPopupYes].Selected)
|
||||
EndParty();
|
||||
if (Buttons[htButtons(ButtonPopupNo)].Selected)
|
||||
if (Buttons[ButtonPopupNo].Selected)
|
||||
ShowPopup(false);
|
||||
}
|
||||
}
|
||||
@@ -253,29 +253,29 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
if (GameState.CurrentRoundNr == 1)
|
||||
{
|
||||
Buttons[htButtons(ButtonBack)].Visible = true;
|
||||
Buttons[htButtons(ButtonExit)].Visible = false;
|
||||
Buttons[ButtonBack].Visible = true;
|
||||
Buttons[ButtonExit].Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Buttons[htButtons(ButtonBack)].Visible = false;
|
||||
Buttons[htButtons(ButtonExit)].Visible = true;
|
||||
Buttons[ButtonBack].Visible = false;
|
||||
Buttons[ButtonExit].Visible = true;
|
||||
}
|
||||
|
||||
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)]);
|
||||
Buttons[ButtonNextRound].Visible = true;
|
||||
Texts[TextFinishMessage].Visible = false;
|
||||
Texts[TextFinishPlayerWin].Visible = false;
|
||||
SetInteractionToButton(Buttons[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)]);
|
||||
Buttons[ButtonNextRound].Visible = false;
|
||||
Texts[TextFinishMessage].Visible = true;
|
||||
Texts[TextFinishPlayerWin].Visible = true;
|
||||
Texts[TextFinishPlayerWin].Text = GetPlayerWinString();
|
||||
SetInteractionToButton(Buttons[ButtonExit]);
|
||||
}
|
||||
|
||||
ShowPopup(false);
|
||||
@@ -313,13 +313,13 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
ExitPopupVisible = Visible;
|
||||
|
||||
Statics[htStatics(StaticPopupBG)].Visible = ExitPopupVisible;
|
||||
Texts[htTexts(TextPopupReallyExit)].Visible = ExitPopupVisible;
|
||||
Buttons[htButtons(ButtonPopupYes)].Visible = ExitPopupVisible;
|
||||
Buttons[htButtons(ButtonPopupNo)].Visible = ExitPopupVisible;
|
||||
Statics[StaticPopupBG].Visible = ExitPopupVisible;
|
||||
Texts[TextPopupReallyExit].Visible = ExitPopupVisible;
|
||||
Buttons[ButtonPopupYes].Visible = ExitPopupVisible;
|
||||
Buttons[ButtonPopupNo].Visible = ExitPopupVisible;
|
||||
|
||||
if (ExitPopupVisible)
|
||||
SetInteractionToButton(Buttons[htButtons(ButtonPopupNo)]);
|
||||
SetInteractionToButton(Buttons[ButtonPopupNo]);
|
||||
}
|
||||
|
||||
private void Back()
|
||||
@@ -331,7 +331,7 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void UpdateNextPlayerPositions()
|
||||
{
|
||||
float x = CBase.Settings.GetRenderW()/2 - ((GameState.NumPlayerAtOnce * Statics[htStatics(StaticNextPlayer)].Rect.W) + ((GameState.NumPlayerAtOnce-1) * 15))/2;
|
||||
float x = CBase.Settings.GetRenderW()/2 - ((GameState.NumPlayerAtOnce * Statics[StaticNextPlayer].Rect.W) + ((GameState.NumPlayerAtOnce-1) * 15))/2;
|
||||
float static_y = 590;
|
||||
float text_y = 550;
|
||||
for (int i = 0; i < GameState.NumPlayerAtOnce; i++)
|
||||
@@ -341,11 +341,11 @@ namespace Vocaluxe.PartyModes
|
||||
NextPlayerStatics[i].Rect.Y = static_y;
|
||||
NextPlayerStatics[i].Visible = true;
|
||||
//text
|
||||
NextPlayerTexts[i].X = x + Statics[htStatics(StaticNextPlayer)].Rect.W / 2;
|
||||
NextPlayerTexts[i].X = x + Statics[StaticNextPlayer].Rect.W / 2;
|
||||
NextPlayerTexts[i].Y = text_y;
|
||||
NextPlayerTexts[i].Visible = true;
|
||||
|
||||
x += Statics[htStatics(StaticNextPlayer)].Rect.W + 15;
|
||||
x += Statics[StaticNextPlayer].Rect.W + 15;
|
||||
}
|
||||
for (int i = GameState.NumPlayerAtOnce; i < _PartyMode.GetMaxPlayer(); i++)
|
||||
{
|
||||
@@ -358,7 +358,7 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
if (GameState.CurrentRoundNr <= GameState.Combs.Count)
|
||||
{
|
||||
Texts[htTexts(TextNextPlayerMessage)].Visible = true;
|
||||
Texts[TextNextPlayerMessage].Visible = true;
|
||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||
for (int i = 0; i < GameState.NumPlayerAtOnce; i++)
|
||||
{
|
||||
@@ -370,7 +370,7 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
else
|
||||
{
|
||||
Texts[htTexts(TextNextPlayerMessage)].Visible = false;
|
||||
Texts[TextNextPlayerMessage].Visible = false;
|
||||
for (int i = 0; i < GameState.NumPlayerAtOnce; i++)
|
||||
{
|
||||
NextPlayerStatics[i].Visible = false;
|
||||
@@ -394,7 +394,7 @@ namespace Vocaluxe.PartyModes
|
||||
for (int round = 0; round < RoundsTable.Count; round++)
|
||||
{
|
||||
//Round-number
|
||||
CText text = GetNewText(Texts[htTexts(TextRoundNumber)]);
|
||||
CText text = GetNewText(Texts[TextRoundNumber]);
|
||||
AddText(text);
|
||||
RoundsTable[round].Number = text;
|
||||
for (int row = 0; row < 2; row++)
|
||||
@@ -402,11 +402,11 @@ namespace Vocaluxe.PartyModes
|
||||
for (int column = 0; column < 3; column++)
|
||||
{
|
||||
//Player
|
||||
text = GetNewText(Texts[htTexts(TextRoundPlayer)]);
|
||||
text = GetNewText(Texts[TextRoundPlayer]);
|
||||
AddText(text);
|
||||
RoundsTable[round].TextPlayer.Add(text);
|
||||
//Score
|
||||
text = GetNewText(Texts[htTexts(TextRoundScore)]);
|
||||
text = GetNewText(Texts[TextRoundScore]);
|
||||
AddText(text);
|
||||
RoundsTable[round].TextScores.Add(text);
|
||||
}
|
||||
@@ -427,14 +427,14 @@ namespace Vocaluxe.PartyModes
|
||||
if (NumRoundsVisible > GameState.Combs.Count)
|
||||
NumRoundsVisible = GameState.Combs.Count;
|
||||
|
||||
float x = Texts[htTexts(TextRoundNumber)].X;
|
||||
float y = Texts[htTexts(TextRoundNumber)].Y;
|
||||
float x = Texts[TextRoundNumber].X;
|
||||
float y = Texts[TextRoundNumber].Y;
|
||||
|
||||
RoundsTableScrollArea.X = x;
|
||||
RoundsTableScrollArea.Y = y;
|
||||
RoundsTableScrollArea.W = CBase.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20;
|
||||
RoundsTableScrollArea.W = CBase.Settings.GetRenderW() - Texts[TextRoundNumber].X - 20;
|
||||
|
||||
float delta = Texts[htTexts(TextRoundNumber)].Height;
|
||||
float delta = Texts[TextRoundNumber].Height;
|
||||
|
||||
//Update statics and texts for rounds
|
||||
for (int round = 0; round < RoundsTable.Count; round++)
|
||||
@@ -455,8 +455,8 @@ namespace Vocaluxe.PartyModes
|
||||
for (int column = row * NumPlayerInOneRow; column < num; column++)
|
||||
{
|
||||
//Player
|
||||
float _x = x + 15 + (CBase.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow * (column - row * NumPlayerInOneRow) + ((CBase.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow) / 2;
|
||||
float maxw = ((CBase.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow) / 2 - 5;
|
||||
float _x = x + 15 + (CBase.Settings.GetRenderW() - Texts[TextRoundNumber].X - 20) / NumPlayerInThisRow * (column - row * NumPlayerInOneRow) + ((CBase.Settings.GetRenderW() - Texts[TextRoundNumber].X - 20) / NumPlayerInThisRow) / 2;
|
||||
float maxw = ((CBase.Settings.GetRenderW() - Texts[TextRoundNumber].X - 20) / NumPlayerInThisRow) / 2 - 5;
|
||||
RoundsTable[round].TextPlayer[column].X = _x;
|
||||
RoundsTable[round].TextPlayer[column].Y = y;
|
||||
RoundsTable[round].TextPlayer[column].MaxWidth = maxw;
|
||||
@@ -510,19 +510,19 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
}
|
||||
|
||||
Buttons[htButtons(ButtonRoundsScrollUp)].Visible = RoundsTableOffset > 0;
|
||||
Buttons[htButtons(ButtonRoundsScrollDown)].Visible = GameState.Combs.Count - NumRoundsVisible - RoundsTableOffset > 0;
|
||||
Buttons[ButtonRoundsScrollUp].Visible = RoundsTableOffset > 0;
|
||||
Buttons[ButtonRoundsScrollDown].Visible = GameState.Combs.Count - NumRoundsVisible - RoundsTableOffset > 0;
|
||||
}
|
||||
|
||||
private void BuildPlayerTable()
|
||||
{
|
||||
PlayerTableScrollArea = new SRectF();
|
||||
PlayerTableScrollArea.X = Texts[htTexts(TextPosition)].X;
|
||||
PlayerTableScrollArea.Y = Texts[htTexts(TextPosition)].Y;
|
||||
PlayerTableScrollArea.W = Texts[htTexts(TextGamePoints)].X - Texts[htTexts(TextPosition)].X;
|
||||
PlayerTableScrollArea.X = Texts[TextPosition].X;
|
||||
PlayerTableScrollArea.Y = Texts[TextPosition].Y;
|
||||
PlayerTableScrollArea.W = Texts[TextGamePoints].X - Texts[TextPosition].X;
|
||||
|
||||
PlayerTable = new List<TableRow>();
|
||||
float delta = Texts[htTexts(TextPosition)].Height * 1.2f;
|
||||
float delta = Texts[TextPosition].Height * 1.2f;
|
||||
|
||||
float h = 0;
|
||||
|
||||
@@ -530,12 +530,12 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
TableRow row = new TableRow();
|
||||
|
||||
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.SingPoints = GetNewText(Texts[htTexts(TextSingPoints)]);
|
||||
row.GamePoints = GetNewText(Texts[htTexts(TextGamePoints)]);
|
||||
row.Pos = GetNewText(Texts[TextPosition]);
|
||||
row.Name = GetNewText(Texts[TextPlayerName]);
|
||||
row.Rounds = GetNewText(Texts[TextNumPlayed]);
|
||||
row.Won = GetNewText(Texts[TextWon]);
|
||||
row.SingPoints = GetNewText(Texts[TextSingPoints]);
|
||||
row.GamePoints = GetNewText(Texts[TextGamePoints]);
|
||||
|
||||
row.Pos.Y += delta * (i + 1);
|
||||
row.Name.Y += delta * (i + 1);
|
||||
@@ -602,8 +602,8 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
}
|
||||
|
||||
Buttons[htButtons(ButtonPlayerScrollUp)].Visible = PlayerTableOffset > 0;
|
||||
Buttons[htButtons(ButtonPlayerScrollDown)].Visible = GameState.ProfileIDs.Count - NumPlayerVisible - PlayerTableOffset > 0;
|
||||
Buttons[ButtonPlayerScrollUp].Visible = PlayerTableOffset > 0;
|
||||
Buttons[ButtonPlayerScrollDown].Visible = GameState.ProfileIDs.Count - NumPlayerVisible - PlayerTableOffset > 0;
|
||||
}
|
||||
|
||||
private void ScrollPlayerTable(int Offset)
|
||||
|
||||
@@ -131,10 +131,10 @@ namespace Vocaluxe.PartyModes
|
||||
break;
|
||||
|
||||
case Keys.Enter:
|
||||
if (Buttons[htButtons(ButtonBack)].Selected)
|
||||
if (Buttons[ButtonBack].Selected)
|
||||
Back();
|
||||
|
||||
if (Buttons[htButtons(ButtonNext)].Selected)
|
||||
if (Buttons[ButtonNext].Selected)
|
||||
Next();
|
||||
|
||||
if (!OnAdd())
|
||||
@@ -238,10 +238,10 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
if (MouseEvent.LB && IsMouseOver(MouseEvent))
|
||||
{
|
||||
if (Buttons[htButtons(ButtonBack)].Selected)
|
||||
if (Buttons[ButtonBack].Selected)
|
||||
Back();
|
||||
|
||||
if (Buttons[htButtons(ButtonNext)].Selected)
|
||||
if (Buttons[ButtonNext].Selected)
|
||||
Next();
|
||||
|
||||
if (!OnAdd())
|
||||
@@ -293,13 +293,13 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void AddButtonPlayerDestination()
|
||||
{
|
||||
Buttons[htButtons(ButtonPlayerDestination)].Visible = false;
|
||||
Buttons[ButtonPlayerDestination].Visible = false;
|
||||
PlayerDestinationButtons = new List<CButton>();
|
||||
int row = 0;
|
||||
int column = 0;
|
||||
for (int i = 1; i <= _PartyMode.GetMaxPlayer(); i++)
|
||||
{
|
||||
CButton b = GetNewButton(Buttons[htButtons(ButtonPlayerDestination)]);
|
||||
CButton b = GetNewButton(Buttons[ButtonPlayerDestination]);
|
||||
b.Rect.X = PlayerDestinationButtonsFirstX + column * (b.Rect.W + PlayerDestinationButtonsSpaceH);
|
||||
b.Rect.Y = PlayerDestinationButtonsFirstY + row * (b.Rect.H + PlayerDestinationButtonsSpaceW);
|
||||
PlayerDestinationButtons.Add(b);
|
||||
@@ -317,13 +317,13 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void AddButtonPlayerChoose()
|
||||
{
|
||||
Buttons[htButtons(ButtonPlayerChoose)].Visible = false;
|
||||
Buttons[ButtonPlayerChoose].Visible = false;
|
||||
PlayerChooseButtons = new List<CPlayerChooseButton>();
|
||||
int row = 0;
|
||||
int column = 0;
|
||||
for (int i = 1; i <= PlayerChooseButtonsNumH * PlayerChooseButtonsNumW; i++)
|
||||
{
|
||||
CButton b = GetNewButton(Buttons[htButtons(ButtonPlayerChoose)]);
|
||||
CButton b = GetNewButton(Buttons[ButtonPlayerChoose]);
|
||||
b.Rect.X = PlayerChooseButtonsFirstX + column * (b.Rect.W + PlayerChooseButtonsSpaceH);
|
||||
b.Rect.Y = PlayerChooseButtonsFirstY + row * (b.Rect.H + PlayerChooseButtonsSpaceW);
|
||||
CPlayerChooseButton pcb = new CPlayerChooseButton();
|
||||
@@ -379,10 +379,10 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
PlayerChooseButtons[i].ProfileID = -1;
|
||||
PlayerChooseButtons[i].Button.Text.Text = String.Empty;
|
||||
PlayerChooseButtons[i].Button.Texture = Buttons[htButtons(ButtonPlayerChoose)].Texture;
|
||||
PlayerChooseButtons[i].Button.STexture = Buttons[htButtons(ButtonPlayerChoose)].STexture;
|
||||
PlayerChooseButtons[i].Button.Color = Buttons[htButtons(ButtonPlayerChoose)].Color;
|
||||
PlayerChooseButtons[i].Button.SColor = Buttons[htButtons(ButtonPlayerChoose)].SColor;
|
||||
PlayerChooseButtons[i].Button.Texture = Buttons[ButtonPlayerChoose].Texture;
|
||||
PlayerChooseButtons[i].Button.STexture = Buttons[ButtonPlayerChoose].STexture;
|
||||
PlayerChooseButtons[i].Button.Color = Buttons[ButtonPlayerChoose].Color;
|
||||
PlayerChooseButtons[i].Button.SColor = Buttons[ButtonPlayerChoose].SColor;
|
||||
PlayerChooseButtons[i].Button.Enabled = false;
|
||||
}
|
||||
}
|
||||
@@ -448,10 +448,10 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayerDestinationButtons[i].Color = Buttons[htButtons(ButtonPlayerDestination)].Color;
|
||||
PlayerDestinationButtons[i].SColor = Buttons[htButtons(ButtonPlayerDestination)].SColor;
|
||||
PlayerDestinationButtons[i].Texture = Buttons[htButtons(ButtonPlayerDestination)].Texture;
|
||||
PlayerDestinationButtons[i].STexture = Buttons[htButtons(ButtonPlayerDestination)].STexture;
|
||||
PlayerDestinationButtons[i].Color = Buttons[ButtonPlayerDestination].Color;
|
||||
PlayerDestinationButtons[i].SColor = Buttons[ButtonPlayerDestination].SColor;
|
||||
PlayerDestinationButtons[i].Texture = Buttons[ButtonPlayerDestination].Texture;
|
||||
PlayerDestinationButtons[i].STexture = Buttons[ButtonPlayerDestination].STexture;
|
||||
PlayerDestinationButtons[i].Text.Text = String.Empty;
|
||||
PlayerDestinationButtons[i].Enabled = false;
|
||||
}
|
||||
@@ -462,11 +462,11 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
if (Data.ScreenNames.ProfileIDs.Count == NumPlayer)
|
||||
{
|
||||
Buttons[htButtons(ButtonNext)].Visible = true;
|
||||
SetInteractionToButton(Buttons[htButtons(ButtonNext)]);
|
||||
Buttons[ButtonNext].Visible = true;
|
||||
SetInteractionToButton(Buttons[ButtonNext]);
|
||||
}
|
||||
else
|
||||
Buttons[htButtons(ButtonNext)].Visible = false;
|
||||
Buttons[ButtonNext].Visible = false;
|
||||
}
|
||||
|
||||
private bool OnAdd()
|
||||
|
||||
@@ -98,10 +98,10 @@ namespace Vocaluxe.PartyModes
|
||||
case Keys.Enter:
|
||||
UpdateSlides();
|
||||
|
||||
if (Buttons[htButtons(ButtonBack)].Selected)
|
||||
if (Buttons[ButtonBack].Selected)
|
||||
Back();
|
||||
|
||||
if (Buttons[htButtons(ButtonNext)].Selected)
|
||||
if (Buttons[ButtonNext].Selected)
|
||||
Next();
|
||||
break;
|
||||
|
||||
@@ -124,10 +124,10 @@ namespace Vocaluxe.PartyModes
|
||||
if (MouseEvent.LB && IsMouseOver(MouseEvent))
|
||||
{
|
||||
UpdateSlides();
|
||||
if (Buttons[htButtons(ButtonBack)].Selected)
|
||||
if (Buttons[ButtonBack].Selected)
|
||||
Back();
|
||||
|
||||
if (Buttons[htButtons(ButtonNext)].Selected)
|
||||
if (Buttons[ButtonNext].Selected)
|
||||
Next();
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
public override bool UpdateGame()
|
||||
{
|
||||
Buttons[htButtons(ButtonNext)].Visible = ConfigOk;
|
||||
Buttons[ButtonNext].Visible = ConfigOk;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -170,78 +170,78 @@ namespace Vocaluxe.PartyModes
|
||||
private void FillSlides()
|
||||
{
|
||||
// build num player slide (min player ... max player);
|
||||
SelectSlides[htSelectSlides(SelectSlideNumPlayerTeam1)].Clear();
|
||||
SelectSlides[SelectSlideNumPlayerTeam1].Clear();
|
||||
for (int i = _PartyMode.GetMinPlayer()/2; i <= _PartyMode.GetMaxPlayer() / 2; i++)
|
||||
{
|
||||
SelectSlides[htSelectSlides(SelectSlideNumPlayerTeam1)].AddValue(i.ToString());
|
||||
SelectSlides[SelectSlideNumPlayerTeam1].AddValue(i.ToString());
|
||||
}
|
||||
SelectSlides[htSelectSlides(SelectSlideNumPlayerTeam1)].Selection = Data.ScreenConfig.NumPlayerTeam1 - (_PartyMode.GetMinPlayer()/2);
|
||||
SelectSlides[SelectSlideNumPlayerTeam1].Selection = Data.ScreenConfig.NumPlayerTeam1 - (_PartyMode.GetMinPlayer()/2);
|
||||
|
||||
SelectSlides[htSelectSlides(SelectSlideNumPlayerTeam2)].Clear();
|
||||
SelectSlides[SelectSlideNumPlayerTeam2].Clear();
|
||||
for (int i = _PartyMode.GetMinPlayer()/2; i <= _PartyMode.GetMaxPlayer() / 2; i++)
|
||||
{
|
||||
SelectSlides[htSelectSlides(SelectSlideNumPlayerTeam2)].AddValue(i.ToString());
|
||||
SelectSlides[SelectSlideNumPlayerTeam2].AddValue(i.ToString());
|
||||
}
|
||||
SelectSlides[htSelectSlides(SelectSlideNumPlayerTeam2)].Selection = Data.ScreenConfig.NumPlayerTeam2 -( _PartyMode.GetMinPlayer()/2);
|
||||
SelectSlides[SelectSlideNumPlayerTeam2].Selection = Data.ScreenConfig.NumPlayerTeam2 -( _PartyMode.GetMinPlayer()/2);
|
||||
|
||||
SelectSlides[htSelectSlides(SelectSlideNumFields)].Clear();
|
||||
SelectSlides[htSelectSlides(SelectSlideNumFields)].AddValue("9");
|
||||
SelectSlides[htSelectSlides(SelectSlideNumFields)].AddValue("16");
|
||||
SelectSlides[htSelectSlides(SelectSlideNumFields)].AddValue("25");
|
||||
SelectSlides[SelectSlideNumFields].Clear();
|
||||
SelectSlides[SelectSlideNumFields].AddValue("9");
|
||||
SelectSlides[SelectSlideNumFields].AddValue("16");
|
||||
SelectSlides[SelectSlideNumFields].AddValue("25");
|
||||
if (Data.ScreenConfig.NumFields == 9)
|
||||
SelectSlides[htSelectSlides(SelectSlideNumFields)].Selection = 0;
|
||||
SelectSlides[SelectSlideNumFields].Selection = 0;
|
||||
else if (Data.ScreenConfig.NumFields == 16)
|
||||
SelectSlides[htSelectSlides(SelectSlideNumFields)].Selection = 1;
|
||||
SelectSlides[SelectSlideNumFields].Selection = 1;
|
||||
else if (Data.ScreenConfig.NumFields == 25)
|
||||
SelectSlides[htSelectSlides(SelectSlideNumFields)].Selection = 2;
|
||||
SelectSlides[SelectSlideNumFields].Selection = 2;
|
||||
|
||||
SelectSlides[htSelectSlides(SelectSlideSongSource)].Clear();
|
||||
SelectSlides[htSelectSlides(SelectSlideSongSource)].SetValues<ESongSource>((int)Data.ScreenConfig.SongSource);
|
||||
SelectSlides[SelectSlideSongSource].Clear();
|
||||
SelectSlides[SelectSlideSongSource].SetValues<ESongSource>((int)Data.ScreenConfig.SongSource);
|
||||
|
||||
string[] _Playlists = CBase.Playlist.GetPlaylistNames();
|
||||
SelectSlides[htSelectSlides(SelectSlidePlaylist)].Clear();
|
||||
SelectSlides[SelectSlidePlaylist].Clear();
|
||||
for (int i = 0; i < _Playlists.Length; i++)
|
||||
{
|
||||
string value = _Playlists[i] + " (" + CBase.Playlist.GetPlaylistSongCount(i) + " " + CBase.Language.Translate("TR_SONGS", _PartyModeID) + ")";
|
||||
SelectSlides[htSelectSlides(SelectSlidePlaylist)].AddValue(value);
|
||||
SelectSlides[SelectSlidePlaylist].AddValue(value);
|
||||
}
|
||||
SelectSlides[htSelectSlides(SelectSlidePlaylist)].Selection = Data.ScreenConfig.PlaylistID;
|
||||
SelectSlides[htSelectSlides(SelectSlidePlaylist)].Visible = Data.ScreenConfig.SongSource == ESongSource.TR_PLAYLIST;
|
||||
SelectSlides[SelectSlidePlaylist].Selection = Data.ScreenConfig.PlaylistID;
|
||||
SelectSlides[SelectSlidePlaylist].Visible = Data.ScreenConfig.SongSource == ESongSource.TR_PLAYLIST;
|
||||
|
||||
string[] _Categories = new string[CBase.Songs.GetNumCategories()];
|
||||
for (int i = 0; i < CBase.Songs.GetNumCategories(); i++ )
|
||||
{
|
||||
_Categories[i] = CBase.Songs.GetCategory(i).Name;
|
||||
}
|
||||
SelectSlides[htSelectSlides(SelectSlideCategory)].Clear();
|
||||
SelectSlides[SelectSlideCategory].Clear();
|
||||
for (int i = 0; i < _Categories.Length; i++)
|
||||
{
|
||||
string value = _Categories[i] + " (" + CBase.Songs.NumSongsInCategory(i) + " " + CBase.Language.Translate("TR_SONGS", _PartyModeID) + ")";
|
||||
SelectSlides[htSelectSlides(SelectSlideCategory)].AddValue(value);
|
||||
SelectSlides[SelectSlideCategory].AddValue(value);
|
||||
}
|
||||
SelectSlides[htSelectSlides(SelectSlideCategory)].Selection = Data.ScreenConfig.CategoryID;
|
||||
SelectSlides[htSelectSlides(SelectSlideCategory)].Visible = Data.ScreenConfig.SongSource == ESongSource.TR_CATEGORY;
|
||||
SelectSlides[SelectSlideCategory].Selection = Data.ScreenConfig.CategoryID;
|
||||
SelectSlides[SelectSlideCategory].Visible = Data.ScreenConfig.SongSource == ESongSource.TR_CATEGORY;
|
||||
|
||||
SelectSlides[htSelectSlides(SelectSlideGameMode)].Visible = true;
|
||||
SelectSlides[htSelectSlides(SelectSlideGameMode)].SetValues<EPartyGameMode>((int)Data.ScreenConfig.GameMode);
|
||||
SelectSlides[SelectSlideGameMode].Visible = true;
|
||||
SelectSlides[SelectSlideGameMode].SetValues<EPartyGameMode>((int)Data.ScreenConfig.GameMode);
|
||||
}
|
||||
|
||||
private void UpdateSlides()
|
||||
{
|
||||
Data.ScreenConfig.NumPlayerTeam1 = SelectSlides[htSelectSlides(SelectSlideNumPlayerTeam1)].Selection + (_PartyMode.GetMinPlayer()/2);
|
||||
Data.ScreenConfig.NumPlayerTeam2 = SelectSlides[htSelectSlides(SelectSlideNumPlayerTeam2)].Selection + (_PartyMode.GetMinPlayer()/2);
|
||||
Data.ScreenConfig.NumPlayerTeam1 = SelectSlides[SelectSlideNumPlayerTeam1].Selection + (_PartyMode.GetMinPlayer()/2);
|
||||
Data.ScreenConfig.NumPlayerTeam2 = SelectSlides[SelectSlideNumPlayerTeam2].Selection + (_PartyMode.GetMinPlayer()/2);
|
||||
|
||||
if (SelectSlides[htSelectSlides(SelectSlideNumFields)].Selection == 0)
|
||||
if (SelectSlides[SelectSlideNumFields].Selection == 0)
|
||||
Data.ScreenConfig.NumFields = 9;
|
||||
else if (SelectSlides[htSelectSlides(SelectSlideNumFields)].Selection == 1)
|
||||
else if (SelectSlides[SelectSlideNumFields].Selection == 1)
|
||||
Data.ScreenConfig.NumFields = 16;
|
||||
else if (SelectSlides[htSelectSlides(SelectSlideNumFields)].Selection == 2)
|
||||
else if (SelectSlides[SelectSlideNumFields].Selection == 2)
|
||||
Data.ScreenConfig.NumFields = 25;
|
||||
|
||||
Data.ScreenConfig.SongSource = (ESongSource)SelectSlides[htSelectSlides(SelectSlideSongSource)].Selection;
|
||||
Data.ScreenConfig.PlaylistID = SelectSlides[htSelectSlides(SelectSlidePlaylist)].Selection;
|
||||
Data.ScreenConfig.CategoryID = SelectSlides[htSelectSlides(SelectSlideCategory)].Selection;
|
||||
Data.ScreenConfig.GameMode = (EPartyGameMode)SelectSlides[htSelectSlides(SelectSlideGameMode)].Selection;
|
||||
Data.ScreenConfig.SongSource = (ESongSource)SelectSlides[SelectSlideSongSource].Selection;
|
||||
Data.ScreenConfig.PlaylistID = SelectSlides[SelectSlidePlaylist].Selection;
|
||||
Data.ScreenConfig.CategoryID = SelectSlides[SelectSlideCategory].Selection;
|
||||
Data.ScreenConfig.GameMode = (EPartyGameMode)SelectSlides[SelectSlideGameMode].Selection;
|
||||
|
||||
EGameMode gm = EGameMode.TR_GAMEMODE_NORMAL;
|
||||
|
||||
@@ -328,8 +328,8 @@ namespace Vocaluxe.PartyModes
|
||||
else
|
||||
ConfigOk = false;
|
||||
}
|
||||
SelectSlides[htSelectSlides(SelectSlideCategory)].Visible = Data.ScreenConfig.SongSource == ESongSource.TR_CATEGORY;
|
||||
SelectSlides[htSelectSlides(SelectSlidePlaylist)].Visible = Data.ScreenConfig.SongSource == ESongSource.TR_PLAYLIST;
|
||||
SelectSlides[SelectSlideCategory].Visible = Data.ScreenConfig.SongSource == ESongSource.TR_CATEGORY;
|
||||
SelectSlides[SelectSlidePlaylist].Visible = Data.ScreenConfig.SongSource == ESongSource.TR_PLAYLIST;
|
||||
}
|
||||
|
||||
private void Back()
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace Vocaluxe.PartyModes
|
||||
base.LoadTheme(XmlPath);
|
||||
|
||||
CreateFields();
|
||||
Buttons[htButtons(ButtonField)].Visible = false;
|
||||
Buttons[ButtonField].Visible = false;
|
||||
}
|
||||
|
||||
public override void DataToScreen(object ReceivedData)
|
||||
@@ -150,11 +150,11 @@ namespace Vocaluxe.PartyModes
|
||||
case Keys.Enter:
|
||||
if (!ExitPopupVisible)
|
||||
{
|
||||
if (Buttons[htButtons(ButtonNextRound)].Selected)
|
||||
if (Buttons[ButtonNextRound].Selected)
|
||||
NextRound();
|
||||
if (Buttons[htButtons(ButtonBack)].Selected && GameData.CurrentRoundNr == 1 && Status != EStatus.FieldSelected)
|
||||
if (Buttons[ButtonBack].Selected && GameData.CurrentRoundNr == 1 && Status != EStatus.FieldSelected)
|
||||
Back();
|
||||
if (Buttons[htButtons(ButtonExit)].Selected && (GameData.CurrentRoundNr > 1 || Status == EStatus.FieldSelected) && Status != EStatus.None)
|
||||
if (Buttons[ButtonExit].Selected && (GameData.CurrentRoundNr > 1 || Status == EStatus.FieldSelected) && Status != EStatus.None)
|
||||
ShowPopup(true);
|
||||
else if (Status == EStatus.None)
|
||||
EndParty();
|
||||
@@ -181,21 +181,21 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
if (Status == EStatus.FieldSelected)
|
||||
{
|
||||
if (Buttons[htButtons(ButtonJokerRandomT1)].Selected)
|
||||
if (Buttons[ButtonJokerRandomT1].Selected)
|
||||
UseJoker(0, 0);
|
||||
if (Buttons[htButtons(ButtonJokerRandomT2)].Selected)
|
||||
if (Buttons[ButtonJokerRandomT2].Selected)
|
||||
UseJoker(1, 0);
|
||||
if (Buttons[htButtons(ButtonJokerRetryT1)].Selected)
|
||||
if (Buttons[ButtonJokerRetryT1].Selected)
|
||||
UseJoker(0, 1);
|
||||
if (Buttons[htButtons(ButtonJokerRetryT2)].Selected)
|
||||
if (Buttons[ButtonJokerRetryT2].Selected)
|
||||
UseJoker(1, 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Buttons[htButtons(ButtonPopupYes)].Selected)
|
||||
if (Buttons[ButtonPopupYes].Selected)
|
||||
EndParty();
|
||||
if (Buttons[htButtons(ButtonPopupNo)].Selected)
|
||||
if (Buttons[ButtonPopupNo].Selected)
|
||||
ShowPopup(false);
|
||||
}
|
||||
break;
|
||||
@@ -212,11 +212,11 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
if (!ExitPopupVisible)
|
||||
{
|
||||
if (Buttons[htButtons(ButtonNextRound)].Selected)
|
||||
if (Buttons[ButtonNextRound].Selected)
|
||||
NextRound();
|
||||
if (Buttons[htButtons(ButtonBack)].Selected)
|
||||
if (Buttons[ButtonBack].Selected)
|
||||
Back();
|
||||
if (Buttons[htButtons(ButtonExit)].Selected)
|
||||
if (Buttons[ButtonExit].Selected)
|
||||
if (Status == EStatus.None)
|
||||
EndParty();
|
||||
else
|
||||
@@ -244,22 +244,22 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
if(Status == EStatus.FieldSelected)
|
||||
{
|
||||
if (Buttons[htButtons(ButtonJokerRandomT1)].Selected)
|
||||
if (Buttons[ButtonJokerRandomT1].Selected)
|
||||
UseJoker(0, 0);
|
||||
if (Buttons[htButtons(ButtonJokerRandomT2)].Selected)
|
||||
if (Buttons[ButtonJokerRandomT2].Selected)
|
||||
UseJoker(1, 0);
|
||||
if (Buttons[htButtons(ButtonJokerRetryT1)].Selected)
|
||||
if (Buttons[ButtonJokerRetryT1].Selected)
|
||||
UseJoker(0, 1);
|
||||
if (Buttons[htButtons(ButtonJokerRetryT2)].Selected)
|
||||
if (Buttons[ButtonJokerRetryT2].Selected)
|
||||
UseJoker(1, 1);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Buttons[htButtons(ButtonPopupYes)].Selected)
|
||||
if (Buttons[ButtonPopupYes].Selected)
|
||||
EndParty();
|
||||
if (Buttons[htButtons(ButtonPopupNo)].Selected)
|
||||
if (Buttons[ButtonPopupNo].Selected)
|
||||
ShowPopup(false);
|
||||
}
|
||||
}
|
||||
@@ -294,15 +294,15 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
BuildWinnerPossibilities();
|
||||
SelectedField = -1;
|
||||
Buttons[htButtons(ButtonBack)].Visible = true;
|
||||
Buttons[htButtons(ButtonExit)].Visible = false;
|
||||
SetInteractionToButton(Buttons[htButtons(ButtonBack)]);
|
||||
Buttons[ButtonBack].Visible = true;
|
||||
Buttons[ButtonExit].Visible = false;
|
||||
SetInteractionToButton(Buttons[ButtonBack]);
|
||||
}
|
||||
else
|
||||
{
|
||||
Buttons[htButtons(ButtonBack)].Visible = false;
|
||||
Buttons[htButtons(ButtonExit)].Visible = true;
|
||||
SetInteractionToButton(Buttons[htButtons(ButtonExit)]);
|
||||
Buttons[ButtonBack].Visible = false;
|
||||
Buttons[ButtonExit].Visible = true;
|
||||
SetInteractionToButton(Buttons[ButtonExit]);
|
||||
}
|
||||
|
||||
Status = EStatus.FieldChoosing;
|
||||
@@ -314,36 +314,36 @@ namespace Vocaluxe.PartyModes
|
||||
if (GameData.CurrentRoundNr <= GameData.NumFields && Winner == 0)
|
||||
{
|
||||
UpdateTeamChoosingMessage();
|
||||
Texts[htTexts(TextNextPlayerT1)].Visible = false;
|
||||
Texts[htTexts(TextNextPlayerT2)].Visible = false;
|
||||
Texts[htTexts(TextNextPlayerNameT1)].Visible = false;
|
||||
Texts[htTexts(TextNextPlayerNameT2)].Visible = false;
|
||||
Statics[htStatics(StaticAvatarT1)].Visible = false;
|
||||
Statics[htStatics(StaticAvatarT2)].Visible = false;
|
||||
Buttons[htButtons(ButtonJokerRandomT1)].Visible = false;
|
||||
Buttons[htButtons(ButtonJokerRandomT2)].Visible = false;
|
||||
Buttons[htButtons(ButtonJokerRetryT1)].Visible = false;
|
||||
Buttons[htButtons(ButtonJokerRetryT2)].Visible = false;
|
||||
Buttons[htButtons(ButtonNextRound)].Visible = false;
|
||||
Texts[htTexts(TextFinishMessage)].Visible = false;
|
||||
Texts[TextNextPlayerT1].Visible = false;
|
||||
Texts[TextNextPlayerT2].Visible = false;
|
||||
Texts[TextNextPlayerNameT1].Visible = false;
|
||||
Texts[TextNextPlayerNameT2].Visible = false;
|
||||
Statics[StaticAvatarT1].Visible = false;
|
||||
Statics[StaticAvatarT2].Visible = false;
|
||||
Buttons[ButtonJokerRandomT1].Visible = false;
|
||||
Buttons[ButtonJokerRandomT2].Visible = false;
|
||||
Buttons[ButtonJokerRetryT1].Visible = false;
|
||||
Buttons[ButtonJokerRetryT2].Visible = false;
|
||||
Buttons[ButtonNextRound].Visible = false;
|
||||
Texts[TextFinishMessage].Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Status = EStatus.None;
|
||||
Buttons[htButtons(ButtonNextRound)].Visible = false;
|
||||
Texts[htTexts(TextFinishMessage)].Visible = true;
|
||||
Texts[htTexts(TextTeamChoosing)].Visible = false;
|
||||
Buttons[ButtonNextRound].Visible = false;
|
||||
Texts[TextFinishMessage].Visible = true;
|
||||
Texts[TextTeamChoosing].Visible = false;
|
||||
if (Winner > 0)
|
||||
{
|
||||
Texts[htTexts(TextFinishMessage)].Color = CBase.Theme.GetPlayerColor(Winner);
|
||||
Texts[htTexts(TextFinishMessage)].Text = CBase.Language.Translate("TR_SCREENMAIN_WINNER", _PartyModeID) + " " + CBase.Language.Translate("TR_TEAM", _PartyModeID) + " " + Winner;
|
||||
Texts[TextFinishMessage].Color = CBase.Theme.GetPlayerColor(Winner);
|
||||
Texts[TextFinishMessage].Text = CBase.Language.Translate("TR_SCREENMAIN_WINNER", _PartyModeID) + " " + CBase.Language.Translate("TR_TEAM", _PartyModeID) + " " + Winner;
|
||||
}
|
||||
else
|
||||
{
|
||||
Texts[htTexts(TextFinishMessage)].Color = new SColorF(1, 1, 1, 1);
|
||||
Texts[htTexts(TextFinishMessage)].Text = CBase.Language.Translate("TR_SCREENMAIN_NOWINNER", _PartyModeID);
|
||||
Texts[TextFinishMessage].Color = new SColorF(1, 1, 1, 1);
|
||||
Texts[TextFinishMessage].Text = CBase.Language.Translate("TR_SCREENMAIN_NOWINNER", _PartyModeID);
|
||||
}
|
||||
SetInteractionToButton(Buttons[htButtons(ButtonExit)]);
|
||||
SetInteractionToButton(Buttons[ButtonExit]);
|
||||
}
|
||||
|
||||
ShowPopup(false);
|
||||
@@ -372,7 +372,7 @@ namespace Vocaluxe.PartyModes
|
||||
for (int i = 0; i < 25; i++)
|
||||
{
|
||||
Field f = new Field();
|
||||
f.Button = GetNewButton(Buttons[htButtons(ButtonField)]);
|
||||
f.Button = GetNewButton(Buttons[ButtonField]);
|
||||
f.Button.Visible = false;
|
||||
f.Content = new Round();
|
||||
AddButton(f.Button);
|
||||
@@ -429,9 +429,9 @@ namespace Vocaluxe.PartyModes
|
||||
for (int i = 0; i < GameData.Rounds.Count; i++)
|
||||
{
|
||||
Fields[i].Button.Enabled = true;
|
||||
Fields[i].Button.Texture = Buttons[htButtons(ButtonField)].Texture;
|
||||
Fields[i].Button.Color = Buttons[htButtons(ButtonField)].Color;
|
||||
Fields[i].Button.SColor = Buttons[htButtons(ButtonField)].SColor;
|
||||
Fields[i].Button.Texture = Buttons[ButtonField].Texture;
|
||||
Fields[i].Button.Color = Buttons[ButtonField].Color;
|
||||
Fields[i].Button.SColor = Buttons[ButtonField].SColor;
|
||||
Fields[i].Content = GameData.Rounds[i];
|
||||
if (Fields[i].Content.Finished)
|
||||
{
|
||||
@@ -500,25 +500,25 @@ namespace Vocaluxe.PartyModes
|
||||
GameData.Rounds[SelectedField].SingerTeam2 = SingerTeam2;
|
||||
UpdateFieldContents();
|
||||
|
||||
Texts[htTexts(TextNextPlayerT1)].Visible = true;
|
||||
Texts[htTexts(TextNextPlayerT2)].Visible = true;
|
||||
Texts[htTexts(TextNextPlayerNameT1)].Visible = true;
|
||||
Texts[htTexts(TextNextPlayerNameT2)].Visible = true;
|
||||
Texts[TextNextPlayerT1].Visible = true;
|
||||
Texts[TextNextPlayerT2].Visible = true;
|
||||
Texts[TextNextPlayerNameT1].Visible = true;
|
||||
Texts[TextNextPlayerNameT2].Visible = true;
|
||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||
Texts[htTexts(TextNextPlayerNameT1)].Text = profiles[GameData.ProfileIDsTeam1[GameData.Rounds[SelectedField].SingerTeam1]].PlayerName;
|
||||
Texts[htTexts(TextNextPlayerNameT2)].Text = profiles[GameData.ProfileIDsTeam2[GameData.Rounds[SelectedField].SingerTeam2]].PlayerName;
|
||||
Statics[htStatics(StaticAvatarT1)].Visible = true;
|
||||
Statics[htStatics(StaticAvatarT2)].Visible = true;
|
||||
Statics[htStatics(StaticAvatarT1)].Texture = profiles[GameData.ProfileIDsTeam1[GameData.Rounds[SelectedField].SingerTeam1]].Avatar.Texture;
|
||||
Statics[htStatics(StaticAvatarT2)].Texture = profiles[GameData.ProfileIDsTeam2[GameData.Rounds[SelectedField].SingerTeam2]].Avatar.Texture;
|
||||
Texts[TextNextPlayerNameT1].Text = profiles[GameData.ProfileIDsTeam1[GameData.Rounds[SelectedField].SingerTeam1]].PlayerName;
|
||||
Texts[TextNextPlayerNameT2].Text = profiles[GameData.ProfileIDsTeam2[GameData.Rounds[SelectedField].SingerTeam2]].PlayerName;
|
||||
Statics[StaticAvatarT1].Visible = true;
|
||||
Statics[StaticAvatarT2].Visible = true;
|
||||
Statics[StaticAvatarT1].Texture = profiles[GameData.ProfileIDsTeam1[GameData.Rounds[SelectedField].SingerTeam1]].Avatar.Texture;
|
||||
Statics[StaticAvatarT2].Texture = profiles[GameData.ProfileIDsTeam2[GameData.Rounds[SelectedField].SingerTeam2]].Avatar.Texture;
|
||||
|
||||
UpdateJokerButtons();
|
||||
|
||||
Buttons[htButtons(ButtonNextRound)].Visible = true;
|
||||
Buttons[htButtons(ButtonExit)].Visible = true;
|
||||
Buttons[htButtons(ButtonBack)].Visible = false;
|
||||
Buttons[ButtonNextRound].Visible = true;
|
||||
Buttons[ButtonExit].Visible = true;
|
||||
Buttons[ButtonBack].Visible = false;
|
||||
|
||||
SetInteractionToButton(Buttons[htButtons(ButtonNextRound)]);
|
||||
SetInteractionToButton(Buttons[ButtonNextRound]);
|
||||
}
|
||||
|
||||
private void FieldSelectedAgain()
|
||||
@@ -539,25 +539,25 @@ namespace Vocaluxe.PartyModes
|
||||
GameData.Rounds[SelectedField].SingerTeam2 = GameData.Rounds[OldSelectedField].SingerTeam2;
|
||||
UpdateFieldContents();
|
||||
|
||||
Texts[htTexts(TextNextPlayerT1)].Visible = true;
|
||||
Texts[htTexts(TextNextPlayerT2)].Visible = true;
|
||||
Texts[htTexts(TextNextPlayerNameT1)].Visible = true;
|
||||
Texts[htTexts(TextNextPlayerNameT2)].Visible = true;
|
||||
Texts[TextNextPlayerT1].Visible = true;
|
||||
Texts[TextNextPlayerT2].Visible = true;
|
||||
Texts[TextNextPlayerNameT1].Visible = true;
|
||||
Texts[TextNextPlayerNameT2].Visible = true;
|
||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||
Texts[htTexts(TextNextPlayerNameT1)].Text = profiles[GameData.ProfileIDsTeam1[GameData.Rounds[SelectedField].SingerTeam1]].PlayerName;
|
||||
Texts[htTexts(TextNextPlayerNameT2)].Text = profiles[GameData.ProfileIDsTeam2[GameData.Rounds[SelectedField].SingerTeam2]].PlayerName;
|
||||
Statics[htStatics(StaticAvatarT1)].Visible = true;
|
||||
Statics[htStatics(StaticAvatarT2)].Visible = true;
|
||||
Statics[htStatics(StaticAvatarT1)].Texture = profiles[GameData.ProfileIDsTeam1[GameData.Rounds[SelectedField].SingerTeam1]].Avatar.Texture;
|
||||
Statics[htStatics(StaticAvatarT2)].Texture = profiles[GameData.ProfileIDsTeam2[GameData.Rounds[SelectedField].SingerTeam2]].Avatar.Texture;
|
||||
Texts[TextNextPlayerNameT1].Text = profiles[GameData.ProfileIDsTeam1[GameData.Rounds[SelectedField].SingerTeam1]].PlayerName;
|
||||
Texts[TextNextPlayerNameT2].Text = profiles[GameData.ProfileIDsTeam2[GameData.Rounds[SelectedField].SingerTeam2]].PlayerName;
|
||||
Statics[StaticAvatarT1].Visible = true;
|
||||
Statics[StaticAvatarT2].Visible = true;
|
||||
Statics[StaticAvatarT1].Texture = profiles[GameData.ProfileIDsTeam1[GameData.Rounds[SelectedField].SingerTeam1]].Avatar.Texture;
|
||||
Statics[StaticAvatarT2].Texture = profiles[GameData.ProfileIDsTeam2[GameData.Rounds[SelectedField].SingerTeam2]].Avatar.Texture;
|
||||
|
||||
UpdateJokerButtons();
|
||||
|
||||
Buttons[htButtons(ButtonNextRound)].Visible = true;
|
||||
Buttons[htButtons(ButtonExit)].Visible = true;
|
||||
Buttons[htButtons(ButtonBack)].Visible = false;
|
||||
Buttons[ButtonNextRound].Visible = true;
|
||||
Buttons[ButtonExit].Visible = true;
|
||||
Buttons[ButtonBack].Visible = false;
|
||||
|
||||
SetInteractionToButton(Buttons[htButtons(ButtonNextRound)]);
|
||||
SetInteractionToButton(Buttons[ButtonNextRound]);
|
||||
}
|
||||
|
||||
private void UseJoker(int TeamNr, int JokerNum)
|
||||
@@ -595,28 +595,28 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void UpdateTeamChoosingMessage()
|
||||
{
|
||||
Texts[htTexts(TextTeamChoosing)].Color = CBase.Theme.GetPlayerColor(GameData.Team + 1);
|
||||
Texts[htTexts(TextTeamChoosing)].Text = CBase.Language.Translate("TR_TEAM", _PartyModeID) + " " + (GameData.Team + 1) + "! " + CBase.Language.Translate("TR_SCREENMAIN_TEAM_CHOOSE", _PartyModeID);
|
||||
Texts[TextTeamChoosing].Color = CBase.Theme.GetPlayerColor(GameData.Team + 1);
|
||||
Texts[TextTeamChoosing].Text = CBase.Language.Translate("TR_TEAM", _PartyModeID) + " " + (GameData.Team + 1) + "! " + CBase.Language.Translate("TR_SCREENMAIN_TEAM_CHOOSE", _PartyModeID);
|
||||
if (Status == EStatus.JokerRetry || Status == EStatus.FieldChoosing)
|
||||
Texts[htTexts(TextTeamChoosing)].Visible = true;
|
||||
Texts[TextTeamChoosing].Visible = true;
|
||||
else
|
||||
Texts[htTexts(TextTeamChoosing)].Visible = false;
|
||||
Texts[TextTeamChoosing].Visible = false;
|
||||
}
|
||||
|
||||
private void UpdateJokerButtons()
|
||||
{
|
||||
Buttons[htButtons(ButtonJokerRandomT1)].Visible = true;
|
||||
Buttons[htButtons(ButtonJokerRandomT2)].Visible = true;
|
||||
Buttons[htButtons(ButtonJokerRandomT1)].Text.Text = GameData.NumJokerRandom[0].ToString();
|
||||
Buttons[htButtons(ButtonJokerRandomT2)].Text.Text = GameData.NumJokerRandom[1].ToString();
|
||||
Buttons[htButtons(ButtonJokerRandomT1)].Enabled = GameData.NumJokerRandom[0] > 0;
|
||||
Buttons[htButtons(ButtonJokerRandomT2)].Enabled = GameData.NumJokerRandom[1] > 0;
|
||||
Buttons[htButtons(ButtonJokerRetryT1)].Visible = true;
|
||||
Buttons[htButtons(ButtonJokerRetryT2)].Visible = true;
|
||||
Buttons[htButtons(ButtonJokerRetryT1)].Text.Text = GameData.NumJokerRetry[0].ToString();
|
||||
Buttons[htButtons(ButtonJokerRetryT2)].Text.Text = GameData.NumJokerRetry[1].ToString();
|
||||
Buttons[htButtons(ButtonJokerRetryT1)].Enabled = GameData.NumJokerRetry[0] > 0;
|
||||
Buttons[htButtons(ButtonJokerRetryT2)].Enabled = GameData.NumJokerRetry[1] > 0;
|
||||
Buttons[ButtonJokerRandomT1].Visible = true;
|
||||
Buttons[ButtonJokerRandomT2].Visible = true;
|
||||
Buttons[ButtonJokerRandomT1].Text.Text = GameData.NumJokerRandom[0].ToString();
|
||||
Buttons[ButtonJokerRandomT2].Text.Text = GameData.NumJokerRandom[1].ToString();
|
||||
Buttons[ButtonJokerRandomT1].Enabled = GameData.NumJokerRandom[0] > 0;
|
||||
Buttons[ButtonJokerRandomT2].Enabled = GameData.NumJokerRandom[1] > 0;
|
||||
Buttons[ButtonJokerRetryT1].Visible = true;
|
||||
Buttons[ButtonJokerRetryT2].Visible = true;
|
||||
Buttons[ButtonJokerRetryT1].Text.Text = GameData.NumJokerRetry[0].ToString();
|
||||
Buttons[ButtonJokerRetryT2].Text.Text = GameData.NumJokerRetry[1].ToString();
|
||||
Buttons[ButtonJokerRetryT1].Enabled = GameData.NumJokerRetry[0] > 0;
|
||||
Buttons[ButtonJokerRetryT2].Enabled = GameData.NumJokerRetry[1] > 0;
|
||||
}
|
||||
|
||||
private void NextRound()
|
||||
@@ -642,13 +642,13 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
ExitPopupVisible = Visible;
|
||||
|
||||
Statics[htStatics(StaticPopupBG)].Visible = ExitPopupVisible;
|
||||
Texts[htTexts(TextPopupReallyExit)].Visible = ExitPopupVisible;
|
||||
Buttons[htButtons(ButtonPopupYes)].Visible = ExitPopupVisible;
|
||||
Buttons[htButtons(ButtonPopupNo)].Visible = ExitPopupVisible;
|
||||
Statics[StaticPopupBG].Visible = ExitPopupVisible;
|
||||
Texts[TextPopupReallyExit].Visible = ExitPopupVisible;
|
||||
Buttons[ButtonPopupYes].Visible = ExitPopupVisible;
|
||||
Buttons[ButtonPopupNo].Visible = ExitPopupVisible;
|
||||
|
||||
if (ExitPopupVisible)
|
||||
SetInteractionToButton(Buttons[htButtons(ButtonPopupNo)]);
|
||||
SetInteractionToButton(Buttons[ButtonPopupNo]);
|
||||
}
|
||||
|
||||
private void Back()
|
||||
|
||||
@@ -144,16 +144,16 @@ namespace Vocaluxe.PartyModes
|
||||
break;
|
||||
|
||||
case Keys.Enter:
|
||||
if (Buttons[htButtons(ButtonBack)].Selected)
|
||||
if (Buttons[ButtonBack].Selected)
|
||||
Back();
|
||||
|
||||
if (Buttons[htButtons(ButtonNext)].Selected)
|
||||
if (Buttons[ButtonNext].Selected)
|
||||
Next();
|
||||
|
||||
if (Buttons[htButtons(ButtonPlayerChooseScrollUp)].Selected)
|
||||
if (Buttons[ButtonPlayerChooseScrollUp].Selected)
|
||||
Scroll(-1);
|
||||
|
||||
if (Buttons[htButtons(ButtonPlayerChooseScrollDown)].Selected)
|
||||
if (Buttons[ButtonPlayerChooseScrollDown].Selected)
|
||||
Scroll(1);
|
||||
|
||||
if (!OnAdd())
|
||||
@@ -277,16 +277,16 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
if (MouseEvent.LB && IsMouseOver(MouseEvent))
|
||||
{
|
||||
if (Buttons[htButtons(ButtonBack)].Selected)
|
||||
if (Buttons[ButtonBack].Selected)
|
||||
Back();
|
||||
|
||||
if (Buttons[htButtons(ButtonNext)].Selected)
|
||||
if (Buttons[ButtonNext].Selected)
|
||||
Next();
|
||||
|
||||
if (Buttons[htButtons(ButtonPlayerChooseScrollUp)].Selected)
|
||||
if (Buttons[ButtonPlayerChooseScrollUp].Selected)
|
||||
Scroll(-1);
|
||||
|
||||
if (Buttons[htButtons(ButtonPlayerChooseScrollDown)].Selected)
|
||||
if (Buttons[ButtonPlayerChooseScrollDown].Selected)
|
||||
Scroll(1);
|
||||
}
|
||||
|
||||
@@ -354,13 +354,13 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void AddButtonPlayerDestination()
|
||||
{
|
||||
Buttons[htButtons(ButtonPlayerDestination)].Visible = false;
|
||||
Buttons[ButtonPlayerDestination].Visible = false;
|
||||
PlayerDestinationButtons = new List<CButton>();
|
||||
int row = 0;
|
||||
int column = 0;
|
||||
for (int i = 1; i <= _PartyMode.GetMaxPlayer(); i++)
|
||||
{
|
||||
CButton b = GetNewButton(Buttons[htButtons(ButtonPlayerDestination)]);
|
||||
CButton b = GetNewButton(Buttons[ButtonPlayerDestination]);
|
||||
b.Rect.X = PlayerDestinationButtonsFirstX + column * (b.Rect.W + PlayerDestinationButtonsSpaceH);
|
||||
b.Rect.Y = PlayerDestinationButtonsFirstY + row * (b.Rect.H + PlayerDestinationButtonsSpaceW);
|
||||
PlayerDestinationButtons.Add(b);
|
||||
@@ -378,13 +378,13 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void AddButtonPlayerChoose()
|
||||
{
|
||||
Buttons[htButtons(ButtonPlayerChoose)].Visible = false;
|
||||
Buttons[ButtonPlayerChoose].Visible = false;
|
||||
PlayerChooseButtons = new List<CPlayerChooseButton>();
|
||||
int row = 0;
|
||||
int column = 0;
|
||||
for (int i = 1; i <= PlayerChooseButtonsNumH * PlayerChooseButtonsNumW; i++)
|
||||
{
|
||||
CButton b = GetNewButton(Buttons[htButtons(ButtonPlayerChoose)]);
|
||||
CButton b = GetNewButton(Buttons[ButtonPlayerChoose]);
|
||||
b.Rect.X = PlayerChooseButtonsFirstX + column * (b.Rect.W + PlayerChooseButtonsSpaceH);
|
||||
b.Rect.Y = PlayerChooseButtonsFirstY + row * (b.Rect.H + PlayerChooseButtonsSpaceW);
|
||||
CPlayerChooseButton pcb = new CPlayerChooseButton();
|
||||
@@ -414,8 +414,8 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
UpdateButtonPlayerChoose(PlayerChooseButtonsOffset);
|
||||
}
|
||||
Buttons[htButtons(ButtonPlayerChooseScrollUp)].Enabled = PlayerChooseButtonsOffset > 0;
|
||||
Buttons[htButtons(ButtonPlayerChooseScrollDown)].Enabled = PlayerChooseButtonsVisibleProfiles.Count > PlayerChooseButtons.Count + PlayerChooseButtonsOffset * PlayerChooseButtonsNumH;
|
||||
Buttons[ButtonPlayerChooseScrollUp].Enabled = PlayerChooseButtonsOffset > 0;
|
||||
Buttons[ButtonPlayerChooseScrollDown].Enabled = PlayerChooseButtonsVisibleProfiles.Count > PlayerChooseButtons.Count + PlayerChooseButtonsOffset * PlayerChooseButtonsNumH;
|
||||
}
|
||||
|
||||
private void UpdateButtonPlayerChoose(int Offset)
|
||||
@@ -442,10 +442,10 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
PlayerChooseButtons[i].ProfileID = -1;
|
||||
PlayerChooseButtons[i].Button.Text.Text = String.Empty;
|
||||
PlayerChooseButtons[i].Button.Texture = Buttons[htButtons(ButtonPlayerChoose)].Texture;
|
||||
PlayerChooseButtons[i].Button.STexture = Buttons[htButtons(ButtonPlayerChoose)].STexture;
|
||||
PlayerChooseButtons[i].Button.Color = Buttons[htButtons(ButtonPlayerChoose)].Color;
|
||||
PlayerChooseButtons[i].Button.SColor = Buttons[htButtons(ButtonPlayerChoose)].SColor;
|
||||
PlayerChooseButtons[i].Button.Texture = Buttons[ButtonPlayerChoose].Texture;
|
||||
PlayerChooseButtons[i].Button.STexture = Buttons[ButtonPlayerChoose].STexture;
|
||||
PlayerChooseButtons[i].Button.Color = Buttons[ButtonPlayerChoose].Color;
|
||||
PlayerChooseButtons[i].Button.SColor = Buttons[ButtonPlayerChoose].SColor;
|
||||
PlayerChooseButtons[i].Button.Enabled = false;
|
||||
}
|
||||
}
|
||||
@@ -534,10 +534,10 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayerDestinationButtons[i].Color = Buttons[htButtons(ButtonPlayerDestination)].Color;
|
||||
PlayerDestinationButtons[i].SColor = Buttons[htButtons(ButtonPlayerDestination)].SColor;
|
||||
PlayerDestinationButtons[i].Texture = Buttons[htButtons(ButtonPlayerDestination)].Texture;
|
||||
PlayerDestinationButtons[i].STexture = Buttons[htButtons(ButtonPlayerDestination)].STexture;
|
||||
PlayerDestinationButtons[i].Color = Buttons[ButtonPlayerDestination].Color;
|
||||
PlayerDestinationButtons[i].SColor = Buttons[ButtonPlayerDestination].SColor;
|
||||
PlayerDestinationButtons[i].Texture = Buttons[ButtonPlayerDestination].Texture;
|
||||
PlayerDestinationButtons[i].STexture = Buttons[ButtonPlayerDestination].STexture;
|
||||
PlayerDestinationButtons[i].Text.Text = String.Empty;
|
||||
PlayerDestinationButtons[i].Enabled = false;
|
||||
}
|
||||
@@ -558,10 +558,10 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].Color = Buttons[htButtons(ButtonPlayerDestination)].Color;
|
||||
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].SColor = Buttons[htButtons(ButtonPlayerDestination)].SColor;
|
||||
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].Texture = Buttons[htButtons(ButtonPlayerDestination)].Texture;
|
||||
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].STexture = Buttons[htButtons(ButtonPlayerDestination)].STexture;
|
||||
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].Color = Buttons[ButtonPlayerDestination].Color;
|
||||
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].SColor = Buttons[ButtonPlayerDestination].SColor;
|
||||
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].Texture = Buttons[ButtonPlayerDestination].Texture;
|
||||
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].STexture = Buttons[ButtonPlayerDestination].STexture;
|
||||
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].Text.Text = String.Empty;
|
||||
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].Enabled = false;
|
||||
}
|
||||
@@ -572,11 +572,11 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
if (Data.ScreenNames.ProfileIDsTeam1.Count == NumPlayerTeam1 && Data.ScreenNames.ProfileIDsTeam2.Count == NumPlayerTeam2)
|
||||
{
|
||||
Buttons[htButtons(ButtonNext)].Visible = true;
|
||||
SetInteractionToButton(Buttons[htButtons(ButtonNext)]);
|
||||
Buttons[ButtonNext].Visible = true;
|
||||
SetInteractionToButton(Buttons[ButtonNext]);
|
||||
}
|
||||
else
|
||||
Buttons[htButtons(ButtonNext)].Visible = false;
|
||||
Buttons[ButtonNext].Visible = false;
|
||||
}
|
||||
|
||||
private bool OnAdd()
|
||||
|
||||
Reference in new issue
Block a user