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()
|
||||
|
||||
Reference in new issue
Block a user