Removed duplicate code in CMenu

This commit is contained in:
Flamefire committed 2013-03-14 00:16:41 +01:00
1 parent d1705147e0
commit da889c9d40
31 files changed
+1595 -1964

No files matched your search

+13
View File
@@ -34,3 +34,16 @@ Output/Songs
*.log
/Output/Playlists/*.xml
/Output/x64/gstreamer/GstreamerHelper.dll
*.tlog
*.suo
*.obj
*.lastbuildstate
*.pch
*.idb
*.exp
*.ilk
*.lib
*.opensdf
*.sdf
Binary file not shown.
@@ -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()
+1 -1
View File
@@ -42,7 +42,7 @@ namespace Vocaluxe.Lib.Video
i = CGstreamerVideoWrapper.LoadVideo(u.AbsoluteUri);
return i;
}
catch (Exception e) { }
catch (Exception) { }
return i;
}
+27 -27
View File
@@ -104,7 +104,7 @@ namespace Vocaluxe.Screens
{
base.LoadTheme(XmlPath);
_ScreenArea = Statics[htStatics(StaticBG)].Rect;
_ScreenArea = Statics[StaticBG].Rect;
}
public override bool HandleInput(KeyEvent KeyEvent)
@@ -124,21 +124,21 @@ namespace Vocaluxe.Screens
return false;
case Keys.Enter:
if (Buttons[htButtons(ButtonNext)].Selected)
if (Buttons[ButtonNext].Selected)
CBackgroundMusic.Next();
if (Buttons[htButtons(ButtonPrevious)].Selected)
if (Buttons[ButtonPrevious].Selected)
CBackgroundMusic.Previous();
if (Buttons[htButtons(ButtonPlay)].Selected)
if (Buttons[ButtonPlay].Selected)
CBackgroundMusic.Play();
if (Buttons[htButtons(ButtonPause)].Selected)
if (Buttons[ButtonPause].Selected)
CBackgroundMusic.Pause();
if (Buttons[htButtons(ButtonRepeat)].Selected)
if (Buttons[ButtonRepeat].Selected)
CBackgroundMusic.RepeatSong = !CBackgroundMusic.RepeatSong;
if (Buttons[htButtons(ButtonShowVideo)].Selected)
if (Buttons[ButtonShowVideo].Selected)
VideoPreview = !VideoPreview;
if (Buttons[htButtons(ButtonSing)].Selected)
if (Buttons[ButtonSing].Selected)
StartSong(CBackgroundMusic.SongID, CBackgroundMusic.Duet);
if (Buttons[htButtons(ButtonToBackgroundVideo)].Selected)
if (Buttons[ButtonToBackgroundVideo].Selected)
VideoBackground = !VideoBackground;
break;
}
@@ -152,21 +152,21 @@ namespace Vocaluxe.Screens
base.HandleMouse(MouseEvent);
if (MouseEvent.LB && IsMouseOver(MouseEvent))
{
if (Buttons[htButtons(ButtonNext)].Selected)
if (Buttons[ButtonNext].Selected)
CBackgroundMusic.Next();
if (Buttons[htButtons(ButtonPrevious)].Selected)
if (Buttons[ButtonPrevious].Selected)
CBackgroundMusic.Previous();
if (Buttons[htButtons(ButtonPlay)].Selected)
if (Buttons[ButtonPlay].Selected)
CBackgroundMusic.Play();
if (Buttons[htButtons(ButtonPause)].Selected)
if (Buttons[ButtonPause].Selected)
CBackgroundMusic.Pause();
if (Buttons[htButtons(ButtonRepeat)].Selected)
if (Buttons[ButtonRepeat].Selected)
CBackgroundMusic.RepeatSong = !CBackgroundMusic.RepeatSong;
if (Buttons[htButtons(ButtonShowVideo)].Selected)
if (Buttons[ButtonShowVideo].Selected)
VideoPreview = !VideoPreview;
if (Buttons[htButtons(ButtonSing)].Selected)
if (Buttons[ButtonSing].Selected)
StartSong(CBackgroundMusic.SongID, CBackgroundMusic.Duet);
if (Buttons[htButtons(ButtonToBackgroundVideo)].Selected)
if (Buttons[ButtonToBackgroundVideo].Selected)
VideoBackground = !VideoBackground;
} else if (MouseEvent.LB)
{
@@ -183,11 +183,11 @@ namespace Vocaluxe.Screens
public override bool UpdateGame()
{
Statics[htStatics(StaticCover)].Visible = !_VideoPreview || !CBackgroundMusic.SongHasVideo;
Buttons[htButtons(ButtonToBackgroundVideo)].Pressed = VideoBackground;
Buttons[htButtons(ButtonShowVideo)].Pressed = _VideoPreview;
Buttons[htButtons(ButtonRepeat)].Pressed = CBackgroundMusic.RepeatSong;
Buttons[htButtons(ButtonSing)].Visible = CBackgroundMusic.CanSing && CParty.CurrentPartyModeID == -1;
Statics[StaticCover].Visible = !_VideoPreview || !CBackgroundMusic.SongHasVideo;
Buttons[ButtonToBackgroundVideo].Pressed = VideoBackground;
Buttons[ButtonShowVideo].Pressed = _VideoPreview;
Buttons[ButtonRepeat].Pressed = CBackgroundMusic.RepeatSong;
Buttons[ButtonSing].Visible = CBackgroundMusic.CanSing && CParty.CurrentPartyModeID == -1;
return true;
}
@@ -200,12 +200,12 @@ namespace Vocaluxe.Screens
{
if (!_Active)
return false;
Statics[htStatics(StaticCover)].Texture = CBackgroundMusic.Cover;
Statics[StaticCover].Texture = CBackgroundMusic.Cover;
if (CBackgroundMusic.VideoEnabled && VideoPreview && CBackgroundMusic.SongHasVideo)
CDraw.DrawTexture(Statics[htStatics(StaticCover)], CBackgroundMusic.GetVideoTexture(), EAspect.Crop);
Buttons[htButtons(ButtonPause)].Visible = CBackgroundMusic.Playing;
Buttons[htButtons(ButtonPlay)].Visible = !CBackgroundMusic.Playing;
Texts[htTexts(TextCurrentSong)].Text = CBackgroundMusic.ArtistAndTitle;
CDraw.DrawTexture(Statics[StaticCover], CBackgroundMusic.GetVideoTexture(), EAspect.Crop);
Buttons[ButtonPause].Visible = CBackgroundMusic.Playing;
Buttons[ButtonPlay].Visible = !CBackgroundMusic.Playing;
Texts[TextCurrentSong].Text = CBackgroundMusic.ArtistAndTitle;
return base.Draw();
}
+18 -18
View File
@@ -42,8 +42,8 @@ namespace Vocaluxe.Screens
{
base.LoadTheme(XmlPath);
_ScreenArea = Statics[htStatics(StaticBG)].Rect;
SelectSlides[htSelectSlides(SelectSlideVolume)].AddValues(new string[] { "0", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "60", "65", "70", "75", "80", "85", "90", "95", "100" });
_ScreenArea = Statics[StaticBG].Rect;
SelectSlides[SelectSlideVolume].AddValues(new string[] { "0", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "60", "65", "70", "75", "80", "85", "90", "95", "100" });
}
public override bool HandleInput(KeyEvent KeyEvent)
@@ -62,19 +62,19 @@ namespace Vocaluxe.Screens
}
else if (MouseEvent.Wheel > 0 && CHelper.IsInBounds(_ScreenArea, MouseEvent))
{
if (SelectSlides[htSelectSlides(SelectSlideVolume)].Selection - MouseEvent.Wheel >= 0)
SelectSlides[htSelectSlides(SelectSlideVolume)].Selection = SelectSlides[htSelectSlides(SelectSlideVolume)].Selection - MouseEvent.Wheel;
else if (SelectSlides[htSelectSlides(SelectSlideVolume)].Selection - MouseEvent.Wheel < 0)
SelectSlides[htSelectSlides(SelectSlideVolume)].Selection = 0;
if (SelectSlides[SelectSlideVolume].Selection - MouseEvent.Wheel >= 0)
SelectSlides[SelectSlideVolume].Selection = SelectSlides[SelectSlideVolume].Selection - MouseEvent.Wheel;
else if (SelectSlides[SelectSlideVolume].Selection - MouseEvent.Wheel < 0)
SelectSlides[SelectSlideVolume].Selection = 0;
SaveConfig();
return true;
}
else if (MouseEvent.Wheel < 0 && CHelper.IsInBounds(_ScreenArea, MouseEvent))
{
if (SelectSlides[htSelectSlides(SelectSlideVolume)].Selection - MouseEvent.Wheel < SelectSlides[htSelectSlides(SelectSlideVolume)].NumValues)
SelectSlides[htSelectSlides(SelectSlideVolume)].Selection = SelectSlides[htSelectSlides(SelectSlideVolume)].Selection - MouseEvent.Wheel;
else if (SelectSlides[htSelectSlides(SelectSlideVolume)].Selection - MouseEvent.Wheel >= SelectSlides[htSelectSlides(SelectSlideVolume)].NumValues)
SelectSlides[htSelectSlides(SelectSlideVolume)].Selection = SelectSlides[htSelectSlides(SelectSlideVolume)].NumValues - 1;
if (SelectSlides[SelectSlideVolume].Selection - MouseEvent.Wheel < SelectSlides[SelectSlideVolume].NumValues)
SelectSlides[SelectSlideVolume].Selection = SelectSlides[SelectSlideVolume].Selection - MouseEvent.Wheel;
else if (SelectSlides[SelectSlideVolume].Selection - MouseEvent.Wheel >= SelectSlides[SelectSlideVolume].NumValues)
SelectSlides[SelectSlideVolume].Selection = SelectSlides[SelectSlideVolume].NumValues - 1;
SaveConfig();
return true;
}
@@ -111,20 +111,20 @@ namespace Vocaluxe.Screens
{
case EScreens.ScreenSong:
if (CSongs.IsInCategory)
CConfig.PreviewMusicVolume = SelectSlides[htSelectSlides(SelectSlideVolume)].Selection * 5;
CConfig.PreviewMusicVolume = SelectSlides[SelectSlideVolume].Selection * 5;
else
{
CConfig.BackgroundMusicVolume = SelectSlides[htSelectSlides(SelectSlideVolume)].Selection * 5;
CConfig.BackgroundMusicVolume = SelectSlides[SelectSlideVolume].Selection * 5;
CBackgroundMusic.ApplyVolume();
}
break;
case EScreens.ScreenSing:
CConfig.GameMusicVolume = SelectSlides[htSelectSlides(SelectSlideVolume)].Selection * 5;
CConfig.GameMusicVolume = SelectSlides[SelectSlideVolume].Selection * 5;
break;
default:
CConfig.BackgroundMusicVolume = SelectSlides[htSelectSlides(SelectSlideVolume)].Selection * 5;
CConfig.BackgroundMusicVolume = SelectSlides[SelectSlideVolume].Selection * 5;
CBackgroundMusic.ApplyVolume();
break;
}
@@ -137,17 +137,17 @@ namespace Vocaluxe.Screens
{
case EScreens.ScreenSong:
if(CSongs.IsInCategory)
SelectSlides[htSelectSlides(SelectSlideVolume)].Selection = (int)(CConfig.PreviewMusicVolume / 5);
SelectSlides[SelectSlideVolume].Selection = (int)(CConfig.PreviewMusicVolume / 5);
else
SelectSlides[htSelectSlides(SelectSlideVolume)].Selection = ((int)CConfig.BackgroundMusicVolume / 5);
SelectSlides[SelectSlideVolume].Selection = ((int)CConfig.BackgroundMusicVolume / 5);
break;
case EScreens.ScreenSing:
SelectSlides[htSelectSlides(SelectSlideVolume)].Selection = ((int)CConfig.GameMusicVolume / 5);
SelectSlides[SelectSlideVolume].Selection = ((int)CConfig.GameMusicVolume / 5);
break;
default:
SelectSlides[htSelectSlides(SelectSlideVolume)].Selection = ((int)CConfig.BackgroundMusicVolume / 5);
SelectSlides[SelectSlideVolume].Selection = ((int)CConfig.BackgroundMusicVolume / 5);
break;
}
}
+22 -22
View File
@@ -160,38 +160,38 @@ namespace Vocaluxe.Screens
{
if (_Pos + p < _Scores[_Round].Count)
{
Texts[htTexts(TextNumber[p])].Visible = true;
Texts[htTexts(TextName[p])].Visible = true;
Texts[htTexts(TextScore[p])].Visible = true;
Texts[htTexts(TextDate[p])].Visible = true;
Texts[TextNumber[p]].Visible = true;
Texts[TextName[p]].Visible = true;
Texts[TextScore[p]].Visible = true;
Texts[TextDate[p]].Visible = true;
Texts[htTexts(TextNumber[p])].Text = (_Pos + p + 1).ToString();
Texts[TextNumber[p]].Text = (_Pos + p + 1).ToString();
string name = _Scores[_Round][_Pos + p].Name;
name += " [" + CLanguage.Translate(Enum.GetName(typeof(EGameDifficulty), _Scores[_Round][_Pos + p].Difficulty)) + "]";
if (_IsDuet)
name += " (P" + (_Scores[_Round][_Pos + p].LineNr + 1).ToString() + ")";
Texts[htTexts(TextName[p])].Text = name;
Texts[TextName[p]].Text = name;
Texts[htTexts(TextScore[p])].Text = _Scores[_Round][_Pos + p].Score.ToString("00000");
Texts[htTexts(TextDate[p])].Text = _Scores[_Round][_Pos + p].Date;
Texts[TextScore[p]].Text = _Scores[_Round][_Pos + p].Score.ToString("00000");
Texts[TextDate[p]].Text = _Scores[_Round][_Pos + p].Date;
if (isNewEntry(_Scores[_Round][_Pos + p].ID) == true)
{
ParticleEffects[htParticleEffects(ParticleEffectNew[p])].Visible = true;
ParticleEffects[ParticleEffectNew[p]].Visible = true;
}
else
{
ParticleEffects[htParticleEffects(ParticleEffectNew[p])].Visible = false;
ParticleEffects[ParticleEffectNew[p]].Visible = false;
}
}
else
{
Texts[htTexts(TextNumber[p])].Visible = false;
Texts[htTexts(TextName[p])].Visible = false;
Texts[htTexts(TextScore[p])].Visible = false;
Texts[htTexts(TextDate[p])].Visible = false;
ParticleEffects[htParticleEffects(ParticleEffectNew[p])].Visible = false;
Texts[TextNumber[p]].Visible = false;
Texts[TextName[p]].Visible = false;
Texts[TextScore[p]].Visible = false;
Texts[TextDate[p]].Visible = false;
ParticleEffects[ParticleEffectNew[p]].Visible = false;
}
}
return true;
@@ -275,33 +275,33 @@ namespace Vocaluxe.Screens
if (song == null)
return;
Texts[htTexts(TextSongName)].Text = song.Artist + " - " + song.Title;
Texts[TextSongName].Text = song.Artist + " - " + song.Title;
if (points.NumRounds > 1)
{
Texts[htTexts(TextSongName)].Text += " (" + (_Round+1) + "/" + points.NumRounds + ")";
Texts[TextSongName].Text += " (" + (_Round+1) + "/" + points.NumRounds + ")";
}
switch (CGame.GetGameMode(_Round))
{
case EGameMode.TR_GAMEMODE_NORMAL:
Texts[htTexts(TextSongMode)].Text = "TR_GAMEMODE_NORMAL";
Texts[TextSongMode].Text = "TR_GAMEMODE_NORMAL";
break;
case EGameMode.TR_GAMEMODE_MEDLEY:
Texts[htTexts(TextSongMode)].Text = "TR_GAMEMODE_MEDLEY";
Texts[TextSongMode].Text = "TR_GAMEMODE_MEDLEY";
break;
case EGameMode.TR_GAMEMODE_DUET:
Texts[htTexts(TextSongMode)].Text = "TR_GAMEMODE_DUET";
Texts[TextSongMode].Text = "TR_GAMEMODE_DUET";
_IsDuet = true;
break;
case EGameMode.TR_GAMEMODE_SHORTSONG:
Texts[htTexts(TextSongMode)].Text = "TR_GAMEMODE_SHORTSONG";
Texts[TextSongMode].Text = "TR_GAMEMODE_SHORTSONG";
break;
default:
Texts[htTexts(TextSongMode)].Text = "TR_GAMEMODE_NORMAL";
Texts[TextSongMode].Text = "TR_GAMEMODE_NORMAL";
break;
}
+2 -2
View File
@@ -106,7 +106,7 @@ namespace Vocaluxe.Screens
_SongLoaderThread = new Thread(new ThreadStart(CSongs.LoadSongs));
_SongLoaderThread.Name = "SongLoader";
Texts[htTexts(TextStatus)].Text = CLanguage.Translate("TR_SCREENLOAD_TOTAL") + ": 0 " +
Texts[TextStatus].Text = CLanguage.Translate("TR_SCREENLOAD_TOTAL") + ": 0 " +
CLanguage.Translate("TR_SCREENLOAD_SONGS") + " (0 " +
CLanguage.Translate("TR_SCREENLOAD_LOADED") + ")";
@@ -175,7 +175,7 @@ namespace Vocaluxe.Screens
if (CSettings.GameState == EGameState.Normal)
CGraphics.FadeTo(EScreens.ScreenMain);
Texts[htTexts(TextStatus)].Text =
Texts[TextStatus].Text =
CLanguage.Translate("TR_SCREENLOAD_TOTAL") + ": " + CSongs.NumAllSongs.ToString() + " " +
CLanguage.Translate("TR_SCREENLOAD_SONGS") + " (" + CSongs.NumSongsWithCoverLoaded + " " +
CLanguage.Translate("TR_SCREENLOAD_LOADED") + ")";
+10 -10
View File
@@ -74,22 +74,22 @@ namespace Vocaluxe.Screens
break;
case Keys.Enter:
if (Buttons[htButtons(ButtonSing)].Selected)
if (Buttons[ButtonSing].Selected)
{
CParty.SetNormalGameMode();
CGraphics.FadeTo(EScreens.ScreenSong);
}
if (Buttons[htButtons(ButtonParty)].Selected)
if (Buttons[ButtonParty].Selected)
CGraphics.FadeTo(EScreens.ScreenParty);
if (Buttons[htButtons(ButtonOptions)].Selected)
if (Buttons[ButtonOptions].Selected)
CGraphics.FadeTo(EScreens.ScreenOptions);
if (Buttons[htButtons(ButtonProfiles)].Selected)
if (Buttons[ButtonProfiles].Selected)
CGraphics.FadeTo(EScreens.ScreenProfiles);
if (Buttons[htButtons(ButtonExit)].Selected)
if (Buttons[ButtonExit].Selected)
return false;
break;
@@ -104,22 +104,22 @@ namespace Vocaluxe.Screens
if (MouseEvent.LB && IsMouseOver(MouseEvent))
{
if (Buttons[htButtons(ButtonSing)].Selected)
if (Buttons[ButtonSing].Selected)
{
CParty.SetNormalGameMode();
CGraphics.FadeTo(EScreens.ScreenSong);
}
if (Buttons[htButtons(ButtonParty)].Selected)
if (Buttons[ButtonParty].Selected)
CGraphics.FadeTo(EScreens.ScreenParty);
if (Buttons[htButtons(ButtonOptions)].Selected)
if (Buttons[ButtonOptions].Selected)
CGraphics.FadeTo(EScreens.ScreenOptions);
if (Buttons[htButtons(ButtonProfiles)].Selected)
if (Buttons[ButtonProfiles].Selected)
CGraphics.FadeTo(EScreens.ScreenProfiles);
if (Buttons[htButtons(ButtonExit)].Selected)
if (Buttons[ButtonExit].Selected)
return false;
}
+104 -104
View File
@@ -107,12 +107,12 @@ namespace Vocaluxe.Screens
for (int i = 0; i < CSettings.MaxNumPlayer; i++)
{
OriginalPlayerAvatarTextures[i] = Statics[htStatics(StaticPlayerAvatar[i])].Texture;
OriginalPlayerAvatarTextures[i] = Statics[StaticPlayerAvatar[i]].Texture;
}
for (int i = 1; i <= CSettings.MaxNumPlayer; i++)
{
Equalizers[htEqualizer("EqualizerPlayer" + i)].ScreenHandles = true;
Equalizers["EqualizerPlayer" + i].ScreenHandles = true;
}
}
@@ -123,20 +123,20 @@ namespace Vocaluxe.Screens
case Keys.Add:
if (CConfig.NumPlayer + 1 <= CSettings.MaxNumPlayer)
{
SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection = CConfig.NumPlayer;
SelectSlides[SelectSlidePlayerNumber].Selection = CConfig.NumPlayer;
UpdatePlayerNumber();
//Update Tiles-List
NameSelections[htNameSelections(NameSelection)].UpdateList();
NameSelections[NameSelection].UpdateList();
}
break;
case Keys.Subtract:
if (CConfig.NumPlayer - 1 > 0)
{
SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection = CConfig.NumPlayer - 2;
SelectSlides[SelectSlidePlayerNumber].Selection = CConfig.NumPlayer - 2;
UpdatePlayerNumber();
//Update Tiles-List
NameSelections[htNameSelections(NameSelection)].UpdateList();
NameSelections[NameSelection].UpdateList();
}
break;
@@ -152,7 +152,7 @@ namespace Vocaluxe.Screens
selectingKeyboardPlayerNr++;
else
selectingKeyboardPlayerNr = 1;
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, selectingKeyboardPlayerNr);
NameSelections[NameSelection].KeyboardSelection(true, selectingKeyboardPlayerNr);
}
break;
}
@@ -160,14 +160,14 @@ namespace Vocaluxe.Screens
if (selectingKeyboardActive)
{
//Handle left/right/up/down
NameSelections[htNameSelections(NameSelection)].HandleInput(KeyEvent);
NameSelections[NameSelection].HandleInput(KeyEvent);
switch (KeyEvent.Key)
{
case Keys.Enter:
//Check, if a player is selected
if (NameSelections[htNameSelections(NameSelection)].Selection > -1)
if (NameSelections[NameSelection].Selection > -1)
{
SelectedPlayerNr = NameSelections[htNameSelections(NameSelection)].Selection;
SelectedPlayerNr = NameSelections[NameSelection].Selection;
//Update Game-infos with new player
CGame.Player[selectingKeyboardPlayerNr-1].Name = CProfiles.Profiles[SelectedPlayerNr].PlayerName;
CGame.Player[selectingKeyboardPlayerNr-1].Difficulty = CProfiles.Profiles[SelectedPlayerNr].Difficulty;
@@ -176,13 +176,13 @@ namespace Vocaluxe.Screens
CConfig.Players[selectingKeyboardPlayerNr - 1] = CProfiles.Profiles[SelectedPlayerNr].ProfileFile;
CConfig.SaveConfig();
//Update texture and name
Statics[htStatics(StaticPlayerAvatar[selectingKeyboardPlayerNr-1])].Texture = CProfiles.Profiles[SelectedPlayerNr].Avatar.Texture;
Texts[htTexts(TextPlayer[selectingKeyboardPlayerNr-1])].Text = CProfiles.Profiles[SelectedPlayerNr].PlayerName;
Statics[StaticPlayerAvatar[selectingKeyboardPlayerNr-1]].Texture = CProfiles.Profiles[SelectedPlayerNr].Avatar.Texture;
Texts[TextPlayer[selectingKeyboardPlayerNr-1]].Text = CProfiles.Profiles[SelectedPlayerNr].PlayerName;
//Update profile-warning
CheckPlayers();
//Update Tiles-List
NameSelections[htNameSelections(NameSelection)].UpdateList();
SetInteractionToButton(Buttons[htButtons(ButtonStart)]);
NameSelections[NameSelection].UpdateList();
SetInteractionToButton(Buttons[ButtonStart]);
}
//Started selecting with 'P'
if (selectingKeyboardUnendless)
@@ -192,12 +192,12 @@ namespace Vocaluxe.Screens
//Reset all values
selectingKeyboardPlayerNr = 0;
selectingKeyboardActive = false;
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
NameSelections[NameSelection].KeyboardSelection(false, -1);
}
else
{
selectingKeyboardPlayerNr++;
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, selectingKeyboardPlayerNr);
NameSelections[NameSelection].KeyboardSelection(true, selectingKeyboardPlayerNr);
}
}
else
@@ -205,7 +205,7 @@ namespace Vocaluxe.Screens
//Reset all values
selectingKeyboardPlayerNr = 0;
selectingKeyboardActive = false;
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
NameSelections[NameSelection].KeyboardSelection(false, -1);
}
break;
@@ -216,12 +216,12 @@ namespace Vocaluxe.Screens
//Reset all values
selectingKeyboardPlayerNr = 0;
selectingKeyboardActive = false;
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
NameSelections[NameSelection].KeyboardSelection(false, -1);
}
else
{
selectingKeyboardPlayerNr = 1;
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 1);
NameSelections[NameSelection].KeyboardSelection(true, 1);
}
selectingKeyboardUnendless = false;
break;
@@ -232,12 +232,12 @@ namespace Vocaluxe.Screens
//Reset all values
selectingKeyboardPlayerNr = 0;
selectingKeyboardActive = false;
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
NameSelections[NameSelection].KeyboardSelection(false, -1);
}
else
{
selectingKeyboardPlayerNr = 2;
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 2);
NameSelections[NameSelection].KeyboardSelection(true, 2);
}
selectingKeyboardUnendless = false;
break;
@@ -248,12 +248,12 @@ namespace Vocaluxe.Screens
//Reset all values
selectingKeyboardPlayerNr = 0;
selectingKeyboardActive = false;
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
NameSelections[NameSelection].KeyboardSelection(false, -1);
}
else
{
selectingKeyboardPlayerNr = 3;
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 3);
NameSelections[NameSelection].KeyboardSelection(true, 3);
}
selectingKeyboardUnendless = false;
break;
@@ -264,12 +264,12 @@ namespace Vocaluxe.Screens
//Reset all values
selectingKeyboardPlayerNr = 0;
selectingKeyboardActive = false;
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
NameSelections[NameSelection].KeyboardSelection(false, -1);
}
else
{
selectingKeyboardPlayerNr = 4;
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 4);
NameSelections[NameSelection].KeyboardSelection(true, 4);
}
selectingKeyboardUnendless = false;
break;
@@ -280,12 +280,12 @@ namespace Vocaluxe.Screens
//Reset all values
selectingKeyboardPlayerNr = 0;
selectingKeyboardActive = false;
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
NameSelections[NameSelection].KeyboardSelection(false, -1);
}
else
{
selectingKeyboardPlayerNr = 5;
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 5);
NameSelections[NameSelection].KeyboardSelection(true, 5);
}
selectingKeyboardUnendless = false;
break;
@@ -296,12 +296,12 @@ namespace Vocaluxe.Screens
//Reset all values
selectingKeyboardPlayerNr = 0;
selectingKeyboardActive = false;
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
NameSelections[NameSelection].KeyboardSelection(false, -1);
}
else
{
selectingKeyboardPlayerNr = 6;
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 6);
NameSelections[NameSelection].KeyboardSelection(true, 6);
}
selectingKeyboardUnendless = false;
break;
@@ -311,7 +311,7 @@ namespace Vocaluxe.Screens
selectingKeyboardPlayerNr = 0;
selectingKeyboardActive = false;
selectingKeyboardUnendless = false;
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
NameSelections[NameSelection].KeyboardSelection(false, -1);
break;
case Keys.Delete:
@@ -323,31 +323,31 @@ namespace Vocaluxe.Screens
CConfig.Players[selectingKeyboardPlayerNr - 1] = String.Empty;
CConfig.SaveConfig();
//Update texture and name
Statics[htStatics(StaticPlayerAvatar[selectingKeyboardPlayerNr - 1])].Texture = OriginalPlayerAvatarTextures[selectingKeyboardPlayerNr - 1];
Texts[htTexts(TextPlayer[selectingKeyboardPlayerNr - 1])].Text = CLanguage.Translate("TR_SCREENNAMES_PLAYER") + " " + selectingKeyboardPlayerNr.ToString();
Statics[StaticPlayerAvatar[selectingKeyboardPlayerNr - 1]].Texture = OriginalPlayerAvatarTextures[selectingKeyboardPlayerNr - 1];
Texts[TextPlayer[selectingKeyboardPlayerNr - 1]].Text = CLanguage.Translate("TR_SCREENNAMES_PLAYER") + " " + selectingKeyboardPlayerNr.ToString();
//Update profile-warning
CheckPlayers();
//Reset all values
selectingKeyboardPlayerNr = 0;
selectingKeyboardActive = false;
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
NameSelections[NameSelection].KeyboardSelection(false, -1);
//Update Tiles-List
NameSelections[htNameSelections(NameSelection)].UpdateList();
NameSelections[NameSelection].UpdateList();
break;
case Keys.F10:
if (CGame.GetNumSongs() == 1 && CGame.GetSong(1).IsDuet)
{
if (SelectSlides[htSelectSlides(SelectSlideDuetPlayer[selectingKeyboardPlayerNr - 1])].Selection == 0)
SelectSlides[htSelectSlides(SelectSlideDuetPlayer[selectingKeyboardPlayerNr - 1])].Selection = 1;
if (SelectSlides[SelectSlideDuetPlayer[selectingKeyboardPlayerNr - 1]].Selection == 0)
SelectSlides[SelectSlideDuetPlayer[selectingKeyboardPlayerNr - 1]].Selection = 1;
else
SelectSlides[htSelectSlides(SelectSlideDuetPlayer[selectingKeyboardPlayerNr - 1])].Selection = 0;
SelectSlides[SelectSlideDuetPlayer[selectingKeyboardPlayerNr - 1]].Selection = 0;
//Reset all values
selectingKeyboardPlayerNr = 0;
selectingKeyboardActive = false;
selectingKeyboardUnendless = false;
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
SetInteractionToButton(Buttons[htButtons(ButtonStart)]);
NameSelections[NameSelection].KeyboardSelection(false, -1);
SetInteractionToButton(Buttons[ButtonStart]);
}
break;
@@ -367,13 +367,13 @@ namespace Vocaluxe.Screens
case Keys.Enter:
if (!processed && Buttons[htButtons(ButtonBack)].Selected)
if (!processed && Buttons[ButtonBack].Selected)
{
processed = true;
CGraphics.FadeTo(EScreens.ScreenSong);
}
if (!processed /* && Buttons[htButtons(ButtonStart)].Selected */)
if (!processed /* && Buttons[ButtonStart].Selected */)
{
processed = true;
StartSong();
@@ -418,7 +418,7 @@ namespace Vocaluxe.Screens
if (selectingKeyboardPlayerNr > 0 && selectingKeyboardPlayerNr <= CConfig.NumPlayer)
{
selectingKeyboardActive = true;
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, selectingKeyboardPlayerNr);
NameSelections[NameSelection].KeyboardSelection(true, selectingKeyboardPlayerNr);
}
}
@@ -436,17 +436,17 @@ namespace Vocaluxe.Screens
OldMouseX = MouseEvent.X;
OldMouseY = MouseEvent.Y;
//Check if mouse if over tile
if (NameSelections[htNameSelections(NameSelection)].isOverTile(MouseEvent))
if (NameSelections[NameSelection].isOverTile(MouseEvent))
{
//Get player-number of tile
SelectedPlayerNr = NameSelections[htNameSelections(NameSelection)].TilePlayerNr(MouseEvent);
SelectedPlayerNr = NameSelections[NameSelection].TilePlayerNr(MouseEvent);
if (SelectedPlayerNr != -1)
{
//Activate mouse-selecting
selectingMouseActive = true;
//Update of Drag/Drop-Texture
CStatic SelectedPlayer = NameSelections[htNameSelections(NameSelection)].TilePlayerAvatar(MouseEvent);
CStatic SelectedPlayer = NameSelections[NameSelection].TilePlayerAvatar(MouseEvent);
chooseAvatarStatic.Visible = true;
chooseAvatarStatic.Rect = SelectedPlayer.Rect;
chooseAvatarStatic.Rect.Z = CSettings.zNear;
@@ -475,10 +475,10 @@ namespace Vocaluxe.Screens
for (int i = 0; i < StaticPlayer.Length; i++)
{
//Check first, if area is "active"
if (Statics[htStatics(StaticPlayer[i])].Visible == true)
if (Statics[StaticPlayer[i]].Visible == true)
{
//Check if Mouse is in area
if (CHelper.IsInBounds(Statics[htStatics(StaticPlayer[i])].Rect, MouseEvent))
if (CHelper.IsInBounds(Statics[StaticPlayer[i]].Rect, MouseEvent))
{
//Update Game-infos with new player
CGame.Player[i].Name = CProfiles.Profiles[SelectedPlayerNr].PlayerName;
@@ -488,12 +488,12 @@ namespace Vocaluxe.Screens
CConfig.Players[i] = CProfiles.Profiles[SelectedPlayerNr].ProfileFile;
CConfig.SaveConfig();
//Update texture and name
Statics[htStatics(StaticPlayerAvatar[i])].Texture = chooseAvatarStatic.Texture;
Texts[htTexts(TextPlayer[i])].Text = CProfiles.Profiles[SelectedPlayerNr].PlayerName;
Statics[StaticPlayerAvatar[i]].Texture = chooseAvatarStatic.Texture;
Texts[TextPlayer[i]].Text = CProfiles.Profiles[SelectedPlayerNr].PlayerName;
//Update profile-warning
CheckPlayers();
//Update Tiles-List
NameSelections[htNameSelections(NameSelection)].UpdateList();
NameSelections[NameSelection].UpdateList();
}
}
}
@@ -513,13 +513,13 @@ namespace Vocaluxe.Screens
{
bool processed = false;
if (!processed && Buttons[htButtons(ButtonBack)].Selected)
if (!processed && Buttons[ButtonBack].Selected)
{
processed = true;
CGraphics.FadeTo(EScreens.ScreenSong);
}
if (!processed && Buttons[htButtons(ButtonStart)].Selected)
if (!processed && Buttons[ButtonStart].Selected)
{
processed = true;
StartSong();
@@ -528,7 +528,7 @@ namespace Vocaluxe.Screens
if (!processed)
UpdatePlayerNumber();
//Update Tiles-List
NameSelections[htNameSelections(NameSelection)].UpdateList();
NameSelections[NameSelection].UpdateList();
}
if (MouseEvent.RB)
@@ -538,7 +538,7 @@ namespace Vocaluxe.Screens
//Remove profile-selection
for (int i = 0; i < CConfig.NumPlayer; i++)
{
if (CHelper.IsInBounds(Statics[htStatics(StaticPlayer[i])].Rect, MouseEvent))
if (CHelper.IsInBounds(Statics[StaticPlayer[i]].Rect, MouseEvent))
{
CGame.Player[i].ProfileID = -1;
CGame.Player[i].Name = String.Empty;
@@ -547,12 +547,12 @@ namespace Vocaluxe.Screens
CConfig.Players[i] = String.Empty;
CConfig.SaveConfig();
//Update texture and name
Statics[htStatics(StaticPlayerAvatar[i])].Texture = OriginalPlayerAvatarTextures[i];
Texts[htTexts(TextPlayer[i])].Text = CLanguage.Translate("TR_SCREENNAMES_PLAYER") + " " + (i+1).ToString();
Statics[StaticPlayerAvatar[i]].Texture = OriginalPlayerAvatarTextures[i];
Texts[TextPlayer[i]].Text = CLanguage.Translate("TR_SCREENNAMES_PLAYER") + " " + (i+1).ToString();
//Update profile-warning
CheckPlayers();
//Update Tiles-List
NameSelections[htNameSelections(NameSelection)].UpdateList();
NameSelections[NameSelection].UpdateList();
exit = false;
}
}
@@ -563,10 +563,10 @@ namespace Vocaluxe.Screens
//Check mouse-wheel for scrolling
if (MouseEvent.Wheel != 0)
{
if (CHelper.IsInBounds(NameSelections[htNameSelections(NameSelection)].Rect, MouseEvent))
if (CHelper.IsInBounds(NameSelections[NameSelection].Rect, MouseEvent))
{
int offset = NameSelections[htNameSelections(NameSelection)]._Offset + MouseEvent.Wheel;
NameSelections[htNameSelections(NameSelection)].UpdateList(offset);
int offset = NameSelections[NameSelection]._Offset + MouseEvent.Wheel;
NameSelections[NameSelection].UpdateList(offset);
}
}
return true;
@@ -577,7 +577,7 @@ namespace Vocaluxe.Screens
for (int i = 1; i <= CGame.NumPlayer; i++)
{
CSound.AnalyzeBuffer((i-1));
Equalizers[htEqualizer("EqualizerPlayer" + i)].Update(CSound.ToneWeigth((i-1)));
Equalizers["EqualizerPlayer" + i].Update(CSound.ToneWeigth((i-1)));
}
return true;
}
@@ -587,7 +587,7 @@ namespace Vocaluxe.Screens
base.OnShow();
CSound.RecordStart();
NameSelections[htNameSelections(NameSelection)].Init();
NameSelections[NameSelection].Init();
UpdateSlides();
UpdatePlayerNumber();
@@ -599,28 +599,28 @@ namespace Vocaluxe.Screens
//Update texture and name
if (CConfig.Players[i].Length > 0)
{
Statics[htStatics(StaticPlayerAvatar[i])].Texture = CProfiles.Profiles[CGame.Player[i].ProfileID].Avatar.Texture;
Texts[htTexts(TextPlayer[i])].Text = CProfiles.Profiles[CGame.Player[i].ProfileID].PlayerName;
Statics[StaticPlayerAvatar[i]].Texture = CProfiles.Profiles[CGame.Player[i].ProfileID].Avatar.Texture;
Texts[TextPlayer[i]].Text = CProfiles.Profiles[CGame.Player[i].ProfileID].PlayerName;
}
if (CGame.GetNumSongs() == 1 && CGame.GetSong(1).IsDuet)
{
SelectSlides[htSelectSlides(SelectSlideDuetPlayer[i])].Clear();
SelectSlides[SelectSlideDuetPlayer[i]].Clear();
if (i + 1 <= CGame.NumPlayer)
SelectSlides[htSelectSlides(SelectSlideDuetPlayer[i])].Visible = true;
SelectSlides[SelectSlideDuetPlayer[i]].Visible = true;
else
SelectSlides[htSelectSlides(SelectSlideDuetPlayer[i])].Visible = false;
SelectSlides[htSelectSlides(SelectSlideDuetPlayer[i])].AddValue(CGame.GetSong(1).DuetPart1);
SelectSlides[htSelectSlides(SelectSlideDuetPlayer[i])].AddValue(CGame.GetSong(1).DuetPart2);
SelectSlides[SelectSlideDuetPlayer[i]].Visible = false;
SelectSlides[SelectSlideDuetPlayer[i]].AddValue(CGame.GetSong(1).DuetPart1);
SelectSlides[SelectSlideDuetPlayer[i]].AddValue(CGame.GetSong(1).DuetPart2);
if ((i + 1) % 2 == 0)
SelectSlides[htSelectSlides(SelectSlideDuetPlayer[i])].Selection = 1;
SelectSlides[SelectSlideDuetPlayer[i]].Selection = 1;
else
SelectSlides[htSelectSlides(SelectSlideDuetPlayer[i])].Selection = 0;
SelectSlides[SelectSlideDuetPlayer[i]].Selection = 0;
}
else
SelectSlides[htSelectSlides(SelectSlideDuetPlayer[i])].Visible = false;
SelectSlides[SelectSlideDuetPlayer[i]].Visible = false;
}
SetInteractionToButton(Buttons[htButtons(ButtonStart)]);
SetInteractionToButton(Buttons[ButtonStart]);
}
public override void OnClose()
@@ -639,7 +639,7 @@ namespace Vocaluxe.Screens
}
for (int i = 1; i <= CGame.NumPlayer; i++)
{
Equalizers[htEqualizer("EqualizerPlayer" + i)].Draw();
Equalizers["EqualizerPlayer" + i].Draw();
}
return true;
}
@@ -664,7 +664,7 @@ namespace Vocaluxe.Screens
}
if (CGame.GetNumSongs() == 1 && CGame.GetSong(1).IsDuet)
{
CGame.Player[i].LineNr = SelectSlides[htSelectSlides(SelectSlideDuetPlayer[i])].Selection;
CGame.Player[i].LineNr = SelectSlides[SelectSlideDuetPlayer[i]].Selection;
}
}
@@ -673,40 +673,40 @@ namespace Vocaluxe.Screens
private void UpdateSlides()
{
SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Clear();
SelectSlides[SelectSlidePlayerNumber].Clear();
for (int i = 1; i <= CSettings.MaxNumPlayer; i++)
{
SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].AddValue(CLanguage.Translate("TR_SCREENNAMES_" + i + "PLAYER"));
SelectSlides[SelectSlidePlayerNumber].AddValue(CLanguage.Translate("TR_SCREENNAMES_" + i + "PLAYER"));
}
SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection = CConfig.NumPlayer - 1;
SelectSlides[SelectSlidePlayerNumber].Selection = CConfig.NumPlayer - 1;
}
private void UpdatePlayerNumber()
{
CConfig.NumPlayer = (int)SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection + 1;
CGame.NumPlayer = (int)SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection + 1;
CConfig.NumPlayer = (int)SelectSlides[SelectSlidePlayerNumber].Selection + 1;
CGame.NumPlayer = (int)SelectSlides[SelectSlidePlayerNumber].Selection + 1;
for (int i = 1; i <= CSettings.MaxNumPlayer; i++)
{
if (i <= CGame.NumPlayer)
{
Statics[htStatics("StaticPlayer" + i)].Visible = true;
Statics[htStatics("StaticPlayerAvatar" + i)].Visible = true;
Texts[htTexts("TextPlayer" + i)].Visible = true;
if (Texts[htTexts("TextPlayer" + i)].Text.Length == 0)
Statics["StaticPlayer" + i].Visible = true;
Statics["StaticPlayerAvatar" + i].Visible = true;
Texts["TextPlayer" + i].Visible = true;
if (Texts["TextPlayer" + i].Text.Length == 0)
{
Texts[htTexts("TextPlayer" + i)].Text = CLanguage.Translate("TR_SCREENNAMES_PLAYER") + " " + i.ToString();
Texts["TextPlayer" + i].Text = CLanguage.Translate("TR_SCREENNAMES_PLAYER") + " " + i.ToString();
}
Equalizers[htEqualizer("EqualizerPlayer" + i)].Visible = true;
Equalizers["EqualizerPlayer" + i].Visible = true;
if (CGame.GetNumSongs() == 1 && CGame.GetSong(1).IsDuet)
SelectSlides[htSelectSlides("SelectSlideDuetPlayer" + i)].Visible = true;
SelectSlides["SelectSlideDuetPlayer" + i].Visible = true;
}
else
{
Statics[htStatics("StaticPlayer" + i)].Visible = false;
Statics[htStatics("StaticPlayerAvatar" + i)].Visible = false;
Texts[htTexts("TextPlayer" + i)].Visible = false;
Equalizers[htEqualizer("EqualizerPlayer" + i)].Visible = false;
SelectSlides[htSelectSlides("SelectSlideDuetPlayer" + i)].Visible = false;
Statics["StaticPlayer" + i].Visible = false;
Statics["StaticPlayerAvatar" + i].Visible = false;
Texts["TextPlayer" + i].Visible = false;
Equalizers["EqualizerPlayer" + i].Visible = false;
SelectSlides["SelectSlideDuetPlayer" + i].Visible = false;
}
}
CConfig.SaveConfig();
@@ -726,8 +726,8 @@ namespace Vocaluxe.Screens
}
if (_PlayerWithoutMicro.Count > 0)
{
Statics[htStatics(StaticWarningMics)].Visible = true;
Texts[htTexts(TextWarningMics)].Visible = true;
Statics[StaticWarningMics].Visible = true;
Texts[TextWarningMics].Visible = true;
if (_PlayerWithoutMicro.Count > 1)
{
@@ -748,17 +748,17 @@ namespace Vocaluxe.Screens
}
}
Texts[htTexts(TextWarningMics)].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_MICS_PL").Replace("%v", PlayerNums);
Texts[TextWarningMics].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_MICS_PL").Replace("%v", PlayerNums);
}
else
{
Texts[htTexts(TextWarningMics)].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_MICS_SG").Replace("%v", _PlayerWithoutMicro[0].ToString());
Texts[TextWarningMics].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_MICS_SG").Replace("%v", _PlayerWithoutMicro[0].ToString());
}
}
else
{
Statics[htStatics(StaticWarningMics)].Visible = false;
Texts[htTexts(TextWarningMics)].Visible = false;
Statics[StaticWarningMics].Visible = false;
Texts[TextWarningMics].Visible = false;
}
}
@@ -775,8 +775,8 @@ namespace Vocaluxe.Screens
if (_PlayerWithoutProfile.Count > 0)
{
Statics[htStatics(StaticWarningProfiles)].Visible = true;
Texts[htTexts(TextWarningProfiles)].Visible = true;
Statics[StaticWarningProfiles].Visible = true;
Texts[TextWarningProfiles].Visible = true;
if (_PlayerWithoutProfile.Count > 1)
{
@@ -797,17 +797,17 @@ namespace Vocaluxe.Screens
}
}
Texts[htTexts(TextWarningProfiles)].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_PROFILES_PL").Replace("%v", PlayerNums);
Texts[TextWarningProfiles].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_PROFILES_PL").Replace("%v", PlayerNums);
}
else
{
Texts[htTexts(TextWarningProfiles)].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_PROFILES_SG").Replace("%v", _PlayerWithoutProfile[0].ToString());
Texts[TextWarningProfiles].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_PROFILES_SG").Replace("%v", _PlayerWithoutProfile[0].ToString());
}
}
else
{
Statics[htStatics(StaticWarningProfiles)].Visible = false;
Texts[htTexts(TextWarningProfiles)].Visible = false;
Statics[StaticWarningProfiles].Visible = false;
Texts[TextWarningProfiles].Visible = false;
}
}
}
+12 -12
View File
@@ -57,22 +57,22 @@ namespace Vocaluxe.Screens
break;
case Keys.Enter:
if (Buttons[htButtons(ButtonOptionsGame)].Selected)
if (Buttons[ButtonOptionsGame].Selected)
CGraphics.FadeTo(EScreens.ScreenOptionsGame);
if (Buttons[htButtons(ButtonOptionsSound)].Selected)
if (Buttons[ButtonOptionsSound].Selected)
CGraphics.FadeTo(EScreens.ScreenOptionsSound);
if (Buttons[htButtons(ButtonOptionsRecord)].Selected)
if (Buttons[ButtonOptionsRecord].Selected)
CGraphics.FadeTo(EScreens.ScreenOptionsRecord);
if (Buttons[htButtons(ButtonOptionsVideo)].Selected)
if (Buttons[ButtonOptionsVideo].Selected)
CGraphics.FadeTo(EScreens.ScreenOptionsVideo);
if (Buttons[htButtons(ButtonOptionsLyrics)].Selected)
if (Buttons[ButtonOptionsLyrics].Selected)
CGraphics.FadeTo(EScreens.ScreenOptionsLyrics);
if (Buttons[htButtons(ButtonOptionsTheme)].Selected)
if (Buttons[ButtonOptionsTheme].Selected)
CGraphics.FadeTo(EScreens.ScreenOptionsTheme);
break;
@@ -87,22 +87,22 @@ namespace Vocaluxe.Screens
if (MouseEvent.LB && IsMouseOver(MouseEvent))
{
if (Buttons[htButtons(ButtonOptionsGame)].Selected)
if (Buttons[ButtonOptionsGame].Selected)
CGraphics.FadeTo(EScreens.ScreenOptionsGame);
if (Buttons[htButtons(ButtonOptionsSound)].Selected)
if (Buttons[ButtonOptionsSound].Selected)
CGraphics.FadeTo(EScreens.ScreenOptionsSound);
if (Buttons[htButtons(ButtonOptionsRecord)].Selected)
if (Buttons[ButtonOptionsRecord].Selected)
CGraphics.FadeTo(EScreens.ScreenOptionsRecord);
if (Buttons[htButtons(ButtonOptionsVideo)].Selected)
if (Buttons[ButtonOptionsVideo].Selected)
CGraphics.FadeTo(EScreens.ScreenOptionsVideo);
if (Buttons[htButtons(ButtonOptionsLyrics)].Selected)
if (Buttons[ButtonOptionsLyrics].Selected)
CGraphics.FadeTo(EScreens.ScreenOptionsLyrics);
if (Buttons[htButtons(ButtonOptionsTheme)].Selected)
if (Buttons[ButtonOptionsTheme].Selected)
CGraphics.FadeTo(EScreens.ScreenOptionsTheme);
}
+15 -15
View File
@@ -55,14 +55,14 @@ namespace Vocaluxe.Screens
{
base.LoadTheme(XmlPath);
SelectSlides[htSelectSlides(SelectSlideLanguage)].AddValues(_Languages);
SelectSlides[htSelectSlides(SelectSlideLanguage)].Selection = _CurrentLang;
SelectSlides[SelectSlideLanguage].AddValues(_Languages);
SelectSlides[SelectSlideLanguage].Selection = _CurrentLang;
SelectSlides[htSelectSlides(SelectSlideDebugLevel)].SetValues<EDebugLevel>((int)CConfig.DebugLevel);
SelectSlides[htSelectSlides(SelectSlideSongMenu)].SetValues<ESongMenu>((int)CConfig.SongMenu);
SelectSlides[htSelectSlides(SelectSlideSongSorting)].SetValues<ESongSorting>((int)CConfig.SongSorting);
SelectSlides[htSelectSlides(SelectSlideTabs)].SetValues<EOffOn>((int)CConfig.Tabs);
SelectSlides[htSelectSlides(SelectSlideTimerMode)].SetValues<ETimerMode>((int)CConfig.TimerMode);
SelectSlides[SelectSlideDebugLevel].SetValues<EDebugLevel>((int)CConfig.DebugLevel);
SelectSlides[SelectSlideSongMenu].SetValues<ESongMenu>((int)CConfig.SongMenu);
SelectSlides[SelectSlideSongSorting].SetValues<ESongSorting>((int)CConfig.SongSorting);
SelectSlides[SelectSlideTabs].SetValues<EOffOn>((int)CConfig.Tabs);
SelectSlides[SelectSlideTimerMode].SetValues<ETimerMode>((int)CConfig.TimerMode);
}
@@ -90,7 +90,7 @@ namespace Vocaluxe.Screens
break;
case Keys.Enter:
if (Buttons[htButtons(ButtonExit)].Selected)
if (Buttons[ButtonExit].Selected)
{
SaveConfig();
CGraphics.FadeTo(EScreens.ScreenOptions);
@@ -122,7 +122,7 @@ namespace Vocaluxe.Screens
if (MouseEvent.LB && IsMouseOver(MouseEvent))
{
SaveConfig();
if (Buttons[htButtons(ButtonExit)].Selected)
if (Buttons[ButtonExit].Selected)
{
CGraphics.FadeTo(EScreens.ScreenOptions);
}
@@ -143,12 +143,12 @@ namespace Vocaluxe.Screens
private void SaveConfig()
{
CConfig.Language = _Languages[SelectSlides[htSelectSlides(SelectSlideLanguage)].Selection];
CConfig.DebugLevel = (EDebugLevel)SelectSlides[htSelectSlides(SelectSlideDebugLevel)].Selection;
CConfig.SongMenu = (ESongMenu)SelectSlides[htSelectSlides(SelectSlideSongMenu)].Selection;
CConfig.SongSorting = (ESongSorting)SelectSlides[htSelectSlides(SelectSlideSongSorting)].Selection;
CConfig.Tabs = (EOffOn)SelectSlides[htSelectSlides(SelectSlideTabs)].Selection;
CConfig.TimerMode = (ETimerMode)SelectSlides[htSelectSlides(SelectSlideTimerMode)].Selection;
CConfig.Language = _Languages[SelectSlides[SelectSlideLanguage].Selection];
CConfig.DebugLevel = (EDebugLevel)SelectSlides[SelectSlideDebugLevel].Selection;
CConfig.SongMenu = (ESongMenu)SelectSlides[SelectSlideSongMenu].Selection;
CConfig.SongSorting = (ESongSorting)SelectSlides[SelectSlideSongSorting].Selection;
CConfig.Tabs = (EOffOn)SelectSlides[SelectSlideTabs].Selection;
CConfig.TimerMode = (ETimerMode)SelectSlides[SelectSlideTimerMode].Selection;
CConfig.SaveConfig();
+6 -6
View File
@@ -36,8 +36,8 @@ namespace Vocaluxe.Screens
public override void LoadTheme(string XmlPath)
{
base.LoadTheme(XmlPath);
SelectSlides[htSelectSlides(SelectSlideLyricStyle)].SetValues<ELyricStyle>((int)CConfig.LyricStyle);
SelectSlides[htSelectSlides(SelectSlideLyricsOnTop)].SetValues<EOffOn>((int)CConfig.LyricsOnTop);
SelectSlides[SelectSlideLyricStyle].SetValues<ELyricStyle>((int)CConfig.LyricStyle);
SelectSlides[SelectSlideLyricsOnTop].SetValues<EOffOn>((int)CConfig.LyricsOnTop);
}
public override bool HandleInput(KeyEvent KeyEvent)
@@ -64,7 +64,7 @@ namespace Vocaluxe.Screens
break;
case Keys.Enter:
if (Buttons[htButtons(ButtonExit)].Selected)
if (Buttons[ButtonExit].Selected)
{
SaveConfig();
CGraphics.FadeTo(EScreens.ScreenOptions);
@@ -95,7 +95,7 @@ namespace Vocaluxe.Screens
if (MouseEvent.LB && IsMouseOver(MouseEvent))
{
SaveConfig();
if (Buttons[htButtons(ButtonExit)].Selected)
if (Buttons[ButtonExit].Selected)
{
CGraphics.FadeTo(EScreens.ScreenOptions);
}
@@ -116,8 +116,8 @@ namespace Vocaluxe.Screens
private void SaveConfig()
{
CConfig.LyricsOnTop = (EOffOn)SelectSlides[htSelectSlides(SelectSlideLyricsOnTop)].Selection;
CConfig.LyricStyle = (ELyricStyle)SelectSlides[htSelectSlides(SelectSlideLyricStyle)].Selection;
CConfig.LyricsOnTop = (EOffOn)SelectSlides[SelectSlideLyricsOnTop].Selection;
CConfig.LyricStyle = (ELyricStyle)SelectSlides[SelectSlideLyricStyle].Selection;
CConfig.SaveConfig();
}
}
+76 -76
View File
@@ -84,33 +84,33 @@ namespace Vocaluxe.Screens
if (max > 7)
max = 7;
SelectSlides[htSelectSlides(SelectSlideRecordChannel1)].NumVisible = max;
SelectSlides[htSelectSlides(SelectSlideRecordChannel2)].NumVisible = max;
SelectSlides[SelectSlideRecordChannel1].NumVisible = max;
SelectSlides[SelectSlideRecordChannel2].NumVisible = max;
SelectSlides[htSelectSlides(SelectSlideRecordChannel1)].AddValue(CLanguage.Translate("TR_CONFIG_OFF"));
SelectSlides[htSelectSlides(SelectSlideRecordChannel2)].AddValue(CLanguage.Translate("TR_CONFIG_OFF"));
SelectSlides[SelectSlideRecordChannel1].AddValue(CLanguage.Translate("TR_CONFIG_OFF"));
SelectSlides[SelectSlideRecordChannel2].AddValue(CLanguage.Translate("TR_CONFIG_OFF"));
for (int i = 1; i <= CSettings.MaxNumPlayer; i++)
{
SelectSlides[htSelectSlides(SelectSlideRecordChannel1)].AddValue(i.ToString());
SelectSlides[htSelectSlides(SelectSlideRecordChannel2)].AddValue(i.ToString());
SelectSlides[SelectSlideRecordChannel1].AddValue(i.ToString());
SelectSlides[SelectSlideRecordChannel2].AddValue(i.ToString());
}
for (int i = 0; i < 26; i++)
{
SelectSlides[htSelectSlides(SelectSlideDelay)].AddValue((i * 20).ToString() + " ms");
SelectSlides[SelectSlideDelay].AddValue((i * 20).ToString() + " ms");
}
ChannelEnergy = new float[StaticEnergyChannel.Length];
for (int i = 0; i < ChannelEnergy.Length; i++)
{
Statics[htStatics(StaticEnergyChannel[i])].Visible = false;
Statics[StaticEnergyChannel[i]].Visible = false;
ChannelEnergy[i] = 0f;
}
Equalizers[htEqualizer(EqualizerChannel1)].ScreenHandles = true;
Equalizers[htEqualizer(EqualizerChannel2)].ScreenHandles = true;
Equalizers[EqualizerChannel1].ScreenHandles = true;
Equalizers[EqualizerChannel2].ScreenHandles = true;
}
public override bool HandleInput(KeyEvent KeyEvent)
@@ -137,13 +137,13 @@ namespace Vocaluxe.Screens
break;
case Keys.Enter:
if (Buttons[htButtons(ButtonExit)].Selected)
if (Buttons[ButtonExit].Selected)
{
SaveMicConfig();
CGraphics.FadeTo(EScreens.ScreenOptions);
}
if (Buttons[htButtons(ButtonDelayTest)].Selected)
if (Buttons[ButtonDelayTest].Selected)
{
TestDelay();
}
@@ -155,32 +155,32 @@ namespace Vocaluxe.Screens
break;
case Keys.Left:
if (SelectSlides[htSelectSlides(SelectSlideRecordDevices)].Selected)
if (SelectSlides[SelectSlideRecordDevices].Selected)
OnDeviceEvent();
if (SelectSlides[htSelectSlides(SelectSlideRecordInputs)].Selected)
if (SelectSlides[SelectSlideRecordInputs].Selected)
OnInputEvent();
if (SelectSlides[htSelectSlides(SelectSlideRecordChannel1)].Selected ||
SelectSlides[htSelectSlides(SelectSlideRecordChannel2)].Selected)
if (SelectSlides[SelectSlideRecordChannel1].Selected ||
SelectSlides[SelectSlideRecordChannel2].Selected)
SetMicConfig();
if (SelectSlides[htSelectSlides(SelectSlideDelay)].Selected)
if (SelectSlides[SelectSlideDelay].Selected)
SaveDelayConfig();
break;
case Keys.Right:
if (SelectSlides[htSelectSlides(SelectSlideRecordDevices)].Selected)
if (SelectSlides[SelectSlideRecordDevices].Selected)
OnDeviceEvent();
if (SelectSlides[htSelectSlides(SelectSlideRecordInputs)].Selected)
if (SelectSlides[SelectSlideRecordInputs].Selected)
OnInputEvent();
if (SelectSlides[htSelectSlides(SelectSlideRecordChannel1)].Selected ||
SelectSlides[htSelectSlides(SelectSlideRecordChannel2)].Selected)
if (SelectSlides[SelectSlideRecordChannel1].Selected ||
SelectSlides[SelectSlideRecordChannel2].Selected)
SetMicConfig();
if (SelectSlides[htSelectSlides(SelectSlideDelay)].Selected)
if (SelectSlides[SelectSlideDelay].Selected)
SaveDelayConfig();
break;
}
@@ -200,26 +200,26 @@ namespace Vocaluxe.Screens
if (MouseEvent.LB && IsMouseOver(MouseEvent))
{
if (SelectSlides[htSelectSlides(SelectSlideRecordDevices)].Selected)
if (SelectSlides[SelectSlideRecordDevices].Selected)
OnDeviceEvent();
if (SelectSlides[htSelectSlides(SelectSlideRecordInputs)].Selected)
if (SelectSlides[SelectSlideRecordInputs].Selected)
OnInputEvent();
if (SelectSlides[htSelectSlides(SelectSlideRecordChannel1)].Selected ||
SelectSlides[htSelectSlides(SelectSlideRecordChannel2)].Selected)
if (SelectSlides[SelectSlideRecordChannel1].Selected ||
SelectSlides[SelectSlideRecordChannel2].Selected)
SetMicConfig();
if (SelectSlides[htSelectSlides(SelectSlideDelay)].Selected)
if (SelectSlides[SelectSlideDelay].Selected)
SaveDelayConfig();
if (Buttons[htButtons(ButtonExit)].Selected)
if (Buttons[ButtonExit].Selected)
{
SaveMicConfig();
CGraphics.FadeTo(EScreens.ScreenOptions);
}
if (Buttons[htButtons(ButtonDelayTest)].Selected)
if (Buttons[ButtonDelayTest].Selected)
{
TestDelay();
}
@@ -250,10 +250,10 @@ namespace Vocaluxe.Screens
{
int player = 0;
if (i == 0)
player = SelectSlides[htSelectSlides(SelectSlideRecordChannel1)].Selection;
player = SelectSlides[SelectSlideRecordChannel1].Selection;
if (i == 1)
player = SelectSlides[htSelectSlides(SelectSlideRecordChannel2)].Selection;
player = SelectSlides[SelectSlideRecordChannel2].Selection;
if (_DelayTest[i].Timer.ElapsedMilliseconds > MaxDelayTime * 1000f || player == 0)
{
@@ -270,32 +270,32 @@ namespace Vocaluxe.Screens
}
}
}
Texts[htTexts(TextDelayChannel1)].Text = _DelayTest[0].Delay.ToString("000") + " ms";
Texts[htTexts(TextDelayChannel2)].Text = _DelayTest[1].Delay.ToString("000") + " ms";
Texts[TextDelayChannel1].Text = _DelayTest[0].Delay.ToString("000") + " ms";
Texts[TextDelayChannel2].Text = _DelayTest[1].Delay.ToString("000") + " ms";
}
if (CheckMicConfig())
{
ChannelEnergy[0] = 0f;
int player = SelectSlides[htSelectSlides(SelectSlideRecordChannel1)].Selection;
int player = SelectSlides[SelectSlideRecordChannel1].Selection;
if (player > 0)
{
ChannelEnergy[0] = CSound.RecordGetMaxVolume(player - 1);
Equalizers[htEqualizer(EqualizerChannel1)].Update(CSound.ToneWeigth(player - 1));
Equalizers[EqualizerChannel1].Update(CSound.ToneWeigth(player - 1));
}
else
Equalizers[htEqualizer(EqualizerChannel1)].Reset();
Equalizers[EqualizerChannel1].Reset();
ChannelEnergy[1] = 0f;
player = SelectSlides[htSelectSlides(SelectSlideRecordChannel2)].Selection;
player = SelectSlides[SelectSlideRecordChannel2].Selection;
if (player > 0)
{
ChannelEnergy[1] = CSound.RecordGetMaxVolume(player - 1);
Equalizers[htEqualizer(EqualizerChannel2)].Update(CSound.ToneWeigth(player - 1));
Equalizers[EqualizerChannel2].Update(CSound.ToneWeigth(player - 1));
}
else
Equalizers[htEqualizer(EqualizerChannel2)].Reset();
Equalizers[EqualizerChannel2].Reset();
}
else
{
@@ -303,8 +303,8 @@ namespace Vocaluxe.Screens
{
ChannelEnergy[i] = 0f;
}
Equalizers[htEqualizer(EqualizerChannel1)].Reset();
Equalizers[htEqualizer(EqualizerChannel2)].Reset();
Equalizers[EqualizerChannel1].Reset();
Equalizers[EqualizerChannel2].Reset();
}
return true;
@@ -314,8 +314,8 @@ namespace Vocaluxe.Screens
{
base.OnShow();
SelectSlides[htSelectSlides(SelectSlideRecordDevices)].Clear();
SelectSlides[htSelectSlides(SelectSlideRecordInputs)].Clear();
SelectSlides[SelectSlideRecordDevices].Clear();
SelectSlides[SelectSlideRecordInputs].Clear();
for (int i = 0; i < ChannelEnergy.Length; i++)
{
@@ -334,23 +334,23 @@ namespace Vocaluxe.Screens
for (int dev = 0; dev < _devices.Length; dev++)
{
SelectSlides[htSelectSlides(SelectSlideRecordDevices)].AddValue(_devices[dev].Name);
SelectSlides[SelectSlideRecordDevices].AddValue(_devices[dev].Name);
}
SelectSlides[htSelectSlides(SelectSlideRecordDevices)].Selection = _DeviceNr;
SelectSlides[SelectSlideRecordDevices].Selection = _DeviceNr;
for (int inp = 0; inp < _devices[0].Inputs.Count; inp++)
{
SelectSlides[htSelectSlides(SelectSlideRecordInputs)].AddValue(_devices[0].Inputs[inp].Name);
SelectSlides[SelectSlideRecordInputs].AddValue(_devices[0].Inputs[inp].Name);
}
SelectSlides[htSelectSlides(SelectSlideRecordInputs)].Selection = _InputNr;
SelectSlides[SelectSlideRecordInputs].Selection = _InputNr;
UpdateChannels();
}
SelectSlides[htSelectSlides(SelectSlideRecordChannel1)].Visible = (_devices != null);
SelectSlides[htSelectSlides(SelectSlideRecordChannel2)].Visible = (_devices != null);
SelectSlides[SelectSlideRecordChannel1].Visible = (_devices != null);
SelectSlides[SelectSlideRecordChannel2].Visible = (_devices != null);
Statics[htStatics(StaticWarning)].Visible = false;
Texts[htTexts(TextWarning)].Visible = false;
Statics[StaticWarning].Visible = false;
Texts[TextWarning].Visible = false;
_DelayTest = null;
if (_devices != null)
@@ -363,7 +363,7 @@ namespace Vocaluxe.Screens
}
}
SelectSlides[htSelectSlides(SelectSlideDelay)].Selection = (int)(CConfig.MicDelay / 20);
SelectSlides[SelectSlideDelay].Selection = (int)(CConfig.MicDelay / 20);
_DelayTestRunning = false;
_DelaySound = -1;
@@ -381,32 +381,32 @@ namespace Vocaluxe.Screens
if (!CheckMicConfig())
{
Statics[htStatics(StaticWarning)].Visible = true;
Texts[htTexts(TextWarning)].Visible = true;
Statics[StaticWarning].Visible = true;
Texts[TextWarning].Visible = true;
}
else
{
Statics[htStatics(StaticWarning)].Visible = false;
Texts[htTexts(TextWarning)].Visible = false;
Statics[StaticWarning].Visible = false;
Texts[TextWarning].Visible = false;
}
for (int i = 0; i < StaticEnergyChannel.Length; i++)
{
if (ChannelEnergy[i] > 0f)
{
SRectF rect = new SRectF(Statics[htStatics(StaticEnergyChannel[i])].Rect.X,
Statics[htStatics(StaticEnergyChannel[i])].Rect.Y,
Statics[htStatics(StaticEnergyChannel[i])].Rect.W * ChannelEnergy[i],
Statics[htStatics(StaticEnergyChannel[i])].Rect.H,
Statics[htStatics(StaticEnergyChannel[i])].Rect.Z);
SRectF rect = new SRectF(Statics[StaticEnergyChannel[i]].Rect.X,
Statics[StaticEnergyChannel[i]].Rect.Y,
Statics[StaticEnergyChannel[i]].Rect.W * ChannelEnergy[i],
Statics[StaticEnergyChannel[i]].Rect.H,
Statics[StaticEnergyChannel[i]].Rect.Z);
CDraw.DrawTexture(Statics[htStatics(StaticEnergyChannel[i])].Texture, Statics[htStatics(StaticEnergyChannel[i])].Rect,
CDraw.DrawTexture(Statics[StaticEnergyChannel[i]].Texture, Statics[StaticEnergyChannel[i]].Rect,
new SColorF(1f, 1f, 1f, 1f), rect);
}
}
Equalizers[htEqualizer(EqualizerChannel1)].Draw();
Equalizers[htEqualizer(EqualizerChannel2)].Draw();
Equalizers[EqualizerChannel1].Draw();
Equalizers[EqualizerChannel2].Draw();
DrawFG();
@@ -424,27 +424,27 @@ namespace Vocaluxe.Screens
private void OnDeviceEvent()
{
if (SelectSlides[htSelectSlides(SelectSlideRecordDevices)].Selection != _DeviceNr)
if (SelectSlides[SelectSlideRecordDevices].Selection != _DeviceNr)
{
SelectSlides[htSelectSlides(SelectSlideRecordInputs)].Clear();
_DeviceNr = SelectSlides[htSelectSlides(SelectSlideRecordDevices)].Selection;
SelectSlides[SelectSlideRecordInputs].Clear();
_DeviceNr = SelectSlides[SelectSlideRecordDevices].Selection;
_InputNr = 0;
for (int inp = 0; inp < _devices[_DeviceNr].Inputs.Count; inp++)
{
SelectSlides[htSelectSlides(SelectSlideRecordInputs)].AddValue(_devices[_DeviceNr].Inputs[inp].Name);
SelectSlides[SelectSlideRecordInputs].AddValue(_devices[_DeviceNr].Inputs[inp].Name);
}
_InputNr = 0;
SelectSlides[htSelectSlides(SelectSlideRecordInputs)].Selection = 0;
SelectSlides[SelectSlideRecordInputs].Selection = 0;
UpdateChannels();
}
}
private void OnInputEvent()
{
if (SelectSlides[htSelectSlides(SelectSlideRecordInputs)].Selection != _InputNr)
if (SelectSlides[SelectSlideRecordInputs].Selection != _InputNr)
{
_InputNr = SelectSlides[htSelectSlides(SelectSlideRecordInputs)].Selection;
_InputNr = SelectSlides[SelectSlideRecordInputs].Selection;
UpdateChannels();
}
@@ -452,7 +452,7 @@ namespace Vocaluxe.Screens
private void SaveDelayConfig()
{
CConfig.MicDelay = SelectSlides[htSelectSlides(SelectSlideDelay)].Selection * 20;
CConfig.MicDelay = SelectSlides[SelectSlideDelay].Selection * 20;
CConfig.SaveConfig();
}
@@ -503,15 +503,15 @@ namespace Vocaluxe.Screens
if (_DeviceNr < 0)
return;
SInput input = _devices[_DeviceNr].Inputs[_InputNr];
input.PlayerChannel1 = SelectSlides[htSelectSlides(SelectSlideRecordChannel1)].Selection;
input.PlayerChannel2 = SelectSlides[htSelectSlides(SelectSlideRecordChannel2)].Selection;
input.PlayerChannel1 = SelectSlides[SelectSlideRecordChannel1].Selection;
input.PlayerChannel2 = SelectSlides[SelectSlideRecordChannel2].Selection;
_devices[_DeviceNr].Inputs[_InputNr] = input;
}
private void UpdateChannels()
{
SelectSlides[htSelectSlides(SelectSlideRecordChannel1)].Selection = _devices[_DeviceNr].Inputs[_InputNr].PlayerChannel1;
SelectSlides[htSelectSlides(SelectSlideRecordChannel2)].Selection = _devices[_DeviceNr].Inputs[_InputNr].PlayerChannel2;
SelectSlides[SelectSlideRecordChannel1].Selection = _devices[_DeviceNr].Inputs[_InputNr].PlayerChannel1;
SelectSlides[SelectSlideRecordChannel2].Selection = _devices[_DeviceNr].Inputs[_InputNr].PlayerChannel2;
SaveMicConfig();
}
+19 -19
View File
@@ -43,15 +43,15 @@ namespace Vocaluxe.Screens
public override void LoadTheme(string XmlPath)
{
base.LoadTheme(XmlPath);
SelectSlides[htSelectSlides(SelectSlideBackgroundMusic)].SetValues<EOffOn>((int)CConfig.BackgroundMusic);
SelectSlides[htSelectSlides(SelectSlideBackgroundMusicVolume)].AddValues(new string[] { "0", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "60", "65", "70", "75", "80", "85", "90", "95", "100"});
SelectSlides[htSelectSlides(SelectSlideBackgroundMusicVolume)].Selection = CConfig.BackgroundMusicVolume / 5;
SelectSlides[htSelectSlides(SelectSlideBackgroundMusicSource)].SetValues<EBackgroundMusicSource>((int)CConfig.BackgroundMusicSource);
SelectSlides[htSelectSlides(SelectSlideBackgroundMusicSource)].Selection = (int)CConfig.BackgroundMusicSource;
SelectSlides[htSelectSlides(SelectSlidePreviewMusicVolume)].AddValues(new string[] { "0", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "60", "65", "70", "75", "80", "85", "90", "95", "100" });
SelectSlides[htSelectSlides(SelectSlidePreviewMusicVolume)].Selection = CConfig.PreviewMusicVolume / 5;
SelectSlides[htSelectSlides(SelectSlideGameMusicVolume)].AddValues(new string[] { "0", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "60", "65", "70", "75", "80", "85", "90", "95", "100" });
SelectSlides[htSelectSlides(SelectSlideGameMusicVolume)].Selection = CConfig.GameMusicVolume / 5;
SelectSlides[SelectSlideBackgroundMusic].SetValues<EOffOn>((int)CConfig.BackgroundMusic);
SelectSlides[SelectSlideBackgroundMusicVolume].AddValues(new string[] { "0", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "60", "65", "70", "75", "80", "85", "90", "95", "100"});
SelectSlides[SelectSlideBackgroundMusicVolume].Selection = CConfig.BackgroundMusicVolume / 5;
SelectSlides[SelectSlideBackgroundMusicSource].SetValues<EBackgroundMusicSource>((int)CConfig.BackgroundMusicSource);
SelectSlides[SelectSlideBackgroundMusicSource].Selection = (int)CConfig.BackgroundMusicSource;
SelectSlides[SelectSlidePreviewMusicVolume].AddValues(new string[] { "0", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "60", "65", "70", "75", "80", "85", "90", "95", "100" });
SelectSlides[SelectSlidePreviewMusicVolume].Selection = CConfig.PreviewMusicVolume / 5;
SelectSlides[SelectSlideGameMusicVolume].AddValues(new string[] { "0", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "60", "65", "70", "75", "80", "85", "90", "95", "100" });
SelectSlides[SelectSlideGameMusicVolume].Selection = CConfig.GameMusicVolume / 5;
}
@@ -79,7 +79,7 @@ namespace Vocaluxe.Screens
break;
case Keys.Enter:
if (Buttons[htButtons(ButtonExit)].Selected)
if (Buttons[ButtonExit].Selected)
{
SaveConfig();
CGraphics.FadeTo(EScreens.ScreenOptions);
@@ -110,7 +110,7 @@ namespace Vocaluxe.Screens
if (MouseEvent.LB && IsMouseOver(MouseEvent))
{
SaveConfig();
if (Buttons[htButtons(ButtonExit)].Selected)
if (Buttons[ButtonExit].Selected)
{
CGraphics.FadeTo(EScreens.ScreenOptions);
}
@@ -122,7 +122,7 @@ namespace Vocaluxe.Screens
{
if (_BackgroundMusicVolume != CConfig.BackgroundMusicVolume)
{
SelectSlides[htSelectSlides(SelectSlideBackgroundMusicVolume)].Selection = CConfig.BackgroundMusicVolume / 5;
SelectSlides[SelectSlideBackgroundMusicVolume].Selection = CConfig.BackgroundMusicVolume / 5;
}
return true;
}
@@ -139,18 +139,18 @@ namespace Vocaluxe.Screens
_BackgroundMusic = CConfig.BackgroundMusic;
_BackgroundMusicVolume = CConfig.BackgroundMusicVolume;
SelectSlides[htSelectSlides(SelectSlideGameMusicVolume)].Selection = CConfig.GameMusicVolume / 5;
SelectSlides[htSelectSlides(SelectSlidePreviewMusicVolume)].Selection = CConfig.PreviewMusicVolume / 5;
SelectSlides[SelectSlideGameMusicVolume].Selection = CConfig.GameMusicVolume / 5;
SelectSlides[SelectSlidePreviewMusicVolume].Selection = CConfig.PreviewMusicVolume / 5;
}
private void SaveConfig()
{
CConfig.GameMusicVolume = SelectSlides[htSelectSlides(SelectSlideGameMusicVolume)].Selection * 5;
CConfig.PreviewMusicVolume = SelectSlides[htSelectSlides(SelectSlidePreviewMusicVolume)].Selection * 5;
CConfig.GameMusicVolume = SelectSlides[SelectSlideGameMusicVolume].Selection * 5;
CConfig.PreviewMusicVolume = SelectSlides[SelectSlidePreviewMusicVolume].Selection * 5;
CConfig.SaveConfig();
EOffOn NewOffOn = (EOffOn)SelectSlides[htSelectSlides(SelectSlideBackgroundMusic)].Selection;
EBackgroundMusicSource NewSource = (EBackgroundMusicSource)SelectSlides[htSelectSlides(SelectSlideBackgroundMusicSource)].Selection;
float NewVolume = SelectSlides[htSelectSlides(SelectSlideBackgroundMusicVolume)].Selection * 5;
EOffOn NewOffOn = (EOffOn)SelectSlides[SelectSlideBackgroundMusic].Selection;
EBackgroundMusicSource NewSource = (EBackgroundMusicSource)SelectSlides[SelectSlideBackgroundMusicSource].Selection;
float NewVolume = SelectSlides[SelectSlideBackgroundMusicVolume].Selection * 5;
CBackgroundMusic.CheckAndApplyConfig(NewOffOn, NewSource, NewVolume);
}
+30 -30
View File
@@ -58,19 +58,19 @@ namespace Vocaluxe.Screens
{
base.LoadTheme(XmlPath);
SelectSlides[htSelectSlides(SelectSlideTheme)].AddValues(CTheme.ThemeNames);
SelectSlides[htSelectSlides(SelectSlideTheme)].Selection = CTheme.GetThemeIndex(-1);
SelectSlides[SelectSlideTheme].AddValues(CTheme.ThemeNames);
SelectSlides[SelectSlideTheme].Selection = CTheme.GetThemeIndex(-1);
SelectSlides[htSelectSlides(SelectSlideSkin)].AddValues(CTheme.SkinNames);
SelectSlides[htSelectSlides(SelectSlideSkin)].Selection = CTheme.GetSkinIndex(-1);
SelectSlides[SelectSlideSkin].AddValues(CTheme.SkinNames);
SelectSlides[SelectSlideSkin].Selection = CTheme.GetSkinIndex(-1);
SelectSlides[htSelectSlides(SelectSlideCover)].AddValues(CCover.CoverThemes);
SelectSlides[htSelectSlides(SelectSlideCover)].Selection = CCover.GetCoverThemeIndex();
SelectSlides[htSelectSlides(SelectSlideNoteLines)].SetValues<EOffOn>((int)CConfig.DrawNoteLines);
SelectSlides[htSelectSlides(SelectSlideToneHelper)].SetValues<EOffOn>((int)CConfig.DrawToneHelper);
SelectSlides[htSelectSlides(SelectSlideTimerLook)].SetValues<ETimerLook>((int)CConfig.TimerLook);
SelectSlides[htSelectSlides(SelectSlideFadeInfo)].SetValues<EFadePlayerInfo>((int)CConfig.FadePlayerInfo);
SelectSlides[htSelectSlides(SelectSlideCoverLoading)].SetValues<ECoverLoading>((int)CConfig.CoverLoading);
SelectSlides[SelectSlideCover].AddValues(CCover.CoverThemes);
SelectSlides[SelectSlideCover].Selection = CCover.GetCoverThemeIndex();
SelectSlides[SelectSlideNoteLines].SetValues<EOffOn>((int)CConfig.DrawNoteLines);
SelectSlides[SelectSlideToneHelper].SetValues<EOffOn>((int)CConfig.DrawToneHelper);
SelectSlides[SelectSlideTimerLook].SetValues<ETimerLook>((int)CConfig.TimerLook);
SelectSlides[SelectSlideFadeInfo].SetValues<EFadePlayerInfo>((int)CConfig.FadePlayerInfo);
SelectSlides[SelectSlideCoverLoading].SetValues<ECoverLoading>((int)CConfig.CoverLoading);
}
public override bool HandleInput(KeyEvent KeyEvent)
@@ -96,7 +96,7 @@ namespace Vocaluxe.Screens
break;
case Keys.Enter:
if (Buttons[htButtons(ButtonExit)].Selected)
if (Buttons[ButtonExit].Selected)
{
Close();
}
@@ -125,7 +125,7 @@ namespace Vocaluxe.Screens
if (MouseEvent.LB && IsMouseOver(MouseEvent))
{
if (Buttons[htButtons(ButtonExit)].Selected)
if (Buttons[ButtonExit].Selected)
{
Close();
}
@@ -164,18 +164,18 @@ namespace Vocaluxe.Screens
private void SaveConfig()
{
CConfig.Theme = CTheme.ThemeNames[SelectSlides[htSelectSlides(SelectSlideTheme)].Selection];
CConfig.Skin = CTheme.SkinNames[SelectSlides[htSelectSlides(SelectSlideSkin)].Selection];
CConfig.CoverTheme = CCover.CoverThemes[SelectSlides[htSelectSlides(SelectSlideCover)].Selection];
CConfig.DrawNoteLines = (EOffOn)SelectSlides[htSelectSlides(SelectSlideNoteLines)].Selection;
CConfig.DrawToneHelper = (EOffOn)SelectSlides[htSelectSlides(SelectSlideToneHelper)].Selection;
CConfig.TimerLook = (ETimerLook)SelectSlides[htSelectSlides(SelectSlideTimerLook)].Selection;
CConfig.FadePlayerInfo = (EFadePlayerInfo)SelectSlides[htSelectSlides(SelectSlideFadeInfo)].Selection;
CConfig.CoverLoading = (ECoverLoading)SelectSlides[htSelectSlides(SelectSlideCoverLoading)].Selection;
CConfig.Theme = CTheme.ThemeNames[SelectSlides[SelectSlideTheme].Selection];
CConfig.Skin = CTheme.SkinNames[SelectSlides[SelectSlideSkin].Selection];
CConfig.CoverTheme = CCover.CoverThemes[SelectSlides[SelectSlideCover].Selection];
CConfig.DrawNoteLines = (EOffOn)SelectSlides[SelectSlideNoteLines].Selection;
CConfig.DrawToneHelper = (EOffOn)SelectSlides[SelectSlideToneHelper].Selection;
CConfig.TimerLook = (ETimerLook)SelectSlides[SelectSlideTimerLook].Selection;
CConfig.FadePlayerInfo = (EFadePlayerInfo)SelectSlides[SelectSlideFadeInfo].Selection;
CConfig.CoverLoading = (ECoverLoading)SelectSlides[SelectSlideCoverLoading].Selection;
CConfig.SaveConfig();
if (_OldCoverTheme != SelectSlides[htSelectSlides(SelectSlideCover)].Selection)
if (_OldCoverTheme != SelectSlides[SelectSlideCover].Selection)
{
CCover.ReloadCover();
CSongs.Filter.SearchString = String.Empty;
@@ -183,10 +183,10 @@ namespace Vocaluxe.Screens
CSongs.Categorizer.Tabs = CConfig.Tabs;
}
if (_OldTheme != SelectSlides[htSelectSlides(SelectSlideTheme)].Selection)
if (_OldTheme != SelectSlides[SelectSlideTheme].Selection)
{
CConfig.Theme = CTheme.ThemeNames[SelectSlides[htSelectSlides(SelectSlideTheme)].Selection];
_OldTheme = SelectSlides[htSelectSlides(SelectSlideTheme)].Selection;
CConfig.Theme = CTheme.ThemeNames[SelectSlides[SelectSlideTheme].Selection];
_OldTheme = SelectSlides[SelectSlideTheme].Selection;
CTheme.UnloadSkins();
CFonts.UnloadThemeFonts(CConfig.Theme);
@@ -206,10 +206,10 @@ namespace Vocaluxe.Screens
private void OnChange()
{
if (_OldTheme != SelectSlides[htSelectSlides(SelectSlideTheme)].Selection)
if (_OldTheme != SelectSlides[SelectSlideTheme].Selection)
{
CConfig.Theme = CTheme.ThemeNames[SelectSlides[htSelectSlides(SelectSlideTheme)].Selection];
_OldTheme = SelectSlides[htSelectSlides(SelectSlideTheme)].Selection;
CConfig.Theme = CTheme.ThemeNames[SelectSlides[SelectSlideTheme].Selection];
_OldTheme = SelectSlides[SelectSlideTheme].Selection;
CTheme.UnloadSkins();
CFonts.UnloadThemeFonts(CConfig.Theme);
@@ -229,9 +229,9 @@ namespace Vocaluxe.Screens
return;
}
if (_TempSkin != SelectSlides[htSelectSlides(SelectSlideSkin)].Selection)
if (_TempSkin != SelectSlides[SelectSlideSkin].Selection)
{
_TempSkin = SelectSlides[htSelectSlides(SelectSlideSkin)].Selection;
_TempSkin = SelectSlides[SelectSlideSkin].Selection;
PauseBG();
CConfig.Skin = CTheme.SkinNames[_TempSkin];
+46 -46
View File
@@ -51,10 +51,10 @@ namespace Vocaluxe.Screens
{
base.LoadTheme(XmlPath);
SelectSlides[htSelectSlides(SelectSlideVideoBackgrounds)].SetValues<EOffOn>((int)CConfig.VideoBackgrounds);
SelectSlides[htSelectSlides(SelectSlideVideoPreview)].SetValues<EOffOn>((int)CConfig.VideoPreview);
SelectSlides[htSelectSlides(SelectSlideVideosInSongs)].SetValues<EOffOn>((int)CConfig.VideosInSongs);
SelectSlides[htSelectSlides(SelectSlideVideosToBackground)].SetValues<EOffOn>((int)CConfig.VideosToBackground);
SelectSlides[SelectSlideVideoBackgrounds].SetValues<EOffOn>((int)CConfig.VideoBackgrounds);
SelectSlides[SelectSlideVideoPreview].SetValues<EOffOn>((int)CConfig.VideoPreview);
SelectSlides[SelectSlideVideosInSongs].SetValues<EOffOn>((int)CConfig.VideosInSongs);
SelectSlides[SelectSlideVideosToBackground].SetValues<EOffOn>((int)CConfig.VideosToBackground);
}
public override bool HandleInput(KeyEvent KeyEvent)
@@ -81,7 +81,7 @@ namespace Vocaluxe.Screens
break;
case Keys.Enter:
if (Buttons[htButtons(ButtonExit)].Selected)
if (Buttons[ButtonExit].Selected)
{
SaveConfig();
CGraphics.FadeTo(EScreens.ScreenOptions);
@@ -89,17 +89,17 @@ namespace Vocaluxe.Screens
break;
case Keys.Left:
if (SelectSlides[htSelectSlides(SelectSlideWebcamDevices)].Selected)
if (SelectSlides[SelectSlideWebcamDevices].Selected)
OnDeviceEvent();
if (SelectSlides[htSelectSlides(SelectSlideWebcamCapabilities)].Selected)
if (SelectSlides[SelectSlideWebcamCapabilities].Selected)
OnCapabilitiesEvent();
SaveConfig();
break;
case Keys.Right:
if (SelectSlides[htSelectSlides(SelectSlideWebcamDevices)].Selected)
if (SelectSlides[SelectSlideWebcamDevices].Selected)
OnDeviceEvent();
if (SelectSlides[htSelectSlides(SelectSlideWebcamCapabilities)].Selected)
if (SelectSlides[SelectSlideWebcamCapabilities].Selected)
OnCapabilitiesEvent();
SaveConfig();
break;
@@ -120,12 +120,12 @@ namespace Vocaluxe.Screens
if (MouseEvent.LB && IsMouseOver(MouseEvent))
{
if (SelectSlides[htSelectSlides(SelectSlideWebcamDevices)].Selected)
if (SelectSlides[SelectSlideWebcamDevices].Selected)
OnDeviceEvent();
if (SelectSlides[htSelectSlides(SelectSlideWebcamCapabilities)].Selected)
if (SelectSlides[SelectSlideWebcamCapabilities].Selected)
OnCapabilitiesEvent();
SaveConfig();
if (Buttons[htButtons(ButtonExit)].Selected)
if (Buttons[ButtonExit].Selected)
{
CGraphics.FadeTo(EScreens.ScreenOptions);
}
@@ -136,8 +136,8 @@ namespace Vocaluxe.Screens
public override bool UpdateGame()
{
CWebcam.GetFrame(ref _WebcamTexture);
Statics[htStatics(StaticWebcamOutput)].Texture = _WebcamTexture;
SelectSlides[htSelectSlides(SelectSlideVideosToBackground)].Selection = (int)CConfig.VideosToBackground;
Statics[StaticWebcamOutput].Texture = _WebcamTexture;
SelectSlides[SelectSlideVideosToBackground].Selection = (int)CConfig.VideosToBackground;
return true;
}
@@ -157,8 +157,8 @@ namespace Vocaluxe.Screens
public override void OnShow()
{
base.OnShow();
SelectSlides[htSelectSlides(SelectSlideWebcamDevices)].Clear();
SelectSlides[htSelectSlides(SelectSlideWebcamCapabilities)].Clear();
SelectSlides[SelectSlideWebcamDevices].Clear();
SelectSlides[SelectSlideWebcamCapabilities].Clear();
_DeviceNr = -1;
_CapabilityNr = -1;
@@ -177,18 +177,18 @@ namespace Vocaluxe.Screens
foreach (SWebcamDevice d in devices)
{
SelectSlides[htSelectSlides(SelectSlideWebcamDevices)].AddValue(d.Name);
SelectSlides[SelectSlideWebcamDevices].AddValue(d.Name);
}
SelectSlides[htSelectSlides(SelectSlideWebcamDevices)].Selection = _DeviceNr;
SelectSlides[SelectSlideWebcamDevices].Selection = _DeviceNr;
foreach (SCapabilities c in devices[_DeviceNr].Capabilities)
{
SelectSlides[htSelectSlides(SelectSlideWebcamCapabilities)].AddValue(c.Width.ToString() + " x " + c.Height.ToString() + " @ " + c.Framerate.ToString() + " FPS ");
SelectSlides[SelectSlideWebcamCapabilities].AddValue(c.Width.ToString() + " x " + c.Height.ToString() + " @ " + c.Framerate.ToString() + " FPS ");
}
_Config.MonikerString = devices[SelectSlides[htSelectSlides(SelectSlideWebcamDevices)].Selection].MonikerString;
_Config.Width = devices[SelectSlides[htSelectSlides(SelectSlideWebcamDevices)].Selection].Capabilities[SelectSlides[htSelectSlides(SelectSlideWebcamCapabilities)].Selection].Width;
_Config.Height = devices[SelectSlides[htSelectSlides(SelectSlideWebcamDevices)].Selection].Capabilities[SelectSlides[htSelectSlides(SelectSlideWebcamCapabilities)].Selection].Height;
_Config.Framerate = devices[SelectSlides[htSelectSlides(SelectSlideWebcamDevices)].Selection].Capabilities[SelectSlides[htSelectSlides(SelectSlideWebcamCapabilities)].Selection].Framerate;
_Config.MonikerString = devices[SelectSlides[SelectSlideWebcamDevices].Selection].MonikerString;
_Config.Width = devices[SelectSlides[SelectSlideWebcamDevices].Selection].Capabilities[SelectSlides[SelectSlideWebcamCapabilities].Selection].Width;
_Config.Height = devices[SelectSlides[SelectSlideWebcamDevices].Selection].Capabilities[SelectSlides[SelectSlideWebcamCapabilities].Selection].Height;
_Config.Framerate = devices[SelectSlides[SelectSlideWebcamDevices].Selection].Capabilities[SelectSlides[SelectSlideWebcamCapabilities].Selection].Framerate;
CWebcam.Close();
CWebcam.Select(CConfig.WebcamConfig);
CWebcam.Start();
@@ -201,17 +201,17 @@ namespace Vocaluxe.Screens
devices = null;
}
SelectSlides[htSelectSlides(SelectSlideWebcamDevices)].Visible = (devices != null && devices.Length > 0);
SelectSlides[htSelectSlides(SelectSlideWebcamCapabilities)].Visible = (devices != null && devices.Length > 0);
Statics[htStatics(StaticWebcamOutput)].Visible = (devices != null && devices.Length > 0);
SelectSlides[SelectSlideWebcamDevices].Visible = (devices != null && devices.Length > 0);
SelectSlides[SelectSlideWebcamCapabilities].Visible = (devices != null && devices.Length > 0);
Statics[StaticWebcamOutput].Visible = (devices != null && devices.Length > 0);
}
private void SaveConfig()
{
CConfig.VideoBackgrounds = (EOffOn)SelectSlides[htSelectSlides(SelectSlideVideoBackgrounds)].Selection;
CConfig.VideoPreview = (EOffOn)SelectSlides[htSelectSlides(SelectSlideVideoPreview)].Selection;
CConfig.VideosInSongs = (EOffOn)SelectSlides[htSelectSlides(SelectSlideVideosInSongs)].Selection;
CConfig.VideosToBackground = (EOffOn)SelectSlides[htSelectSlides(SelectSlideVideosToBackground)].Selection;
CConfig.VideoBackgrounds = (EOffOn)SelectSlides[SelectSlideVideoBackgrounds].Selection;
CConfig.VideoPreview = (EOffOn)SelectSlides[SelectSlideVideoPreview].Selection;
CConfig.VideosInSongs = (EOffOn)SelectSlides[SelectSlideVideosInSongs].Selection;
CConfig.VideosToBackground = (EOffOn)SelectSlides[SelectSlideVideosToBackground].Selection;
CConfig.WebcamConfig = _Config;
CBackgroundMusic.VideoEnabled = true;
@@ -221,23 +221,23 @@ namespace Vocaluxe.Screens
private void OnDeviceEvent()
{
if (SelectSlides[htSelectSlides(SelectSlideWebcamDevices)].Selection != _DeviceNr)
if (SelectSlides[SelectSlideWebcamDevices].Selection != _DeviceNr)
{
SelectSlides[htSelectSlides(SelectSlideWebcamCapabilities)].Clear();
_DeviceNr = SelectSlides[htSelectSlides(SelectSlideWebcamDevices)].Selection;
SelectSlides[SelectSlideWebcamCapabilities].Clear();
_DeviceNr = SelectSlides[SelectSlideWebcamDevices].Selection;
_CapabilityNr = 0;
SWebcamDevice[] d = CWebcam.GetDevices();
for (int i = 0; i < d[SelectSlides[htSelectSlides(SelectSlideWebcamDevices)].Selection].Capabilities.Count; i++)
for (int i = 0; i < d[SelectSlides[SelectSlideWebcamDevices].Selection].Capabilities.Count; i++)
{
SelectSlides[htSelectSlides(SelectSlideWebcamCapabilities)].AddValue(d[_DeviceNr].Capabilities[i].Width.ToString() + " x " + d[_DeviceNr].Capabilities[i].Height.ToString() + " @ " + d[_DeviceNr].Capabilities[i].Framerate.ToString() + "FPS");
SelectSlides[SelectSlideWebcamCapabilities].AddValue(d[_DeviceNr].Capabilities[i].Width.ToString() + " x " + d[_DeviceNr].Capabilities[i].Height.ToString() + " @ " + d[_DeviceNr].Capabilities[i].Framerate.ToString() + "FPS");
}
SelectSlides[htSelectSlides(SelectSlideWebcamCapabilities)].Selection = 0;
SelectSlides[SelectSlideWebcamCapabilities].Selection = 0;
_Config.MonikerString = d[SelectSlides[htSelectSlides(SelectSlideWebcamDevices)].Selection].MonikerString;
_Config.Width = d[SelectSlides[htSelectSlides(SelectSlideWebcamDevices)].Selection].Capabilities[SelectSlides[htSelectSlides(SelectSlideWebcamCapabilities)].Selection].Width;
_Config.Height = d[SelectSlides[htSelectSlides(SelectSlideWebcamDevices)].Selection].Capabilities[SelectSlides[htSelectSlides(SelectSlideWebcamCapabilities)].Selection].Height;
_Config.Framerate = d[SelectSlides[htSelectSlides(SelectSlideWebcamDevices)].Selection].Capabilities[SelectSlides[htSelectSlides(SelectSlideWebcamCapabilities)].Selection].Framerate;
_Config.MonikerString = d[SelectSlides[SelectSlideWebcamDevices].Selection].MonikerString;
_Config.Width = d[SelectSlides[SelectSlideWebcamDevices].Selection].Capabilities[SelectSlides[SelectSlideWebcamCapabilities].Selection].Width;
_Config.Height = d[SelectSlides[SelectSlideWebcamDevices].Selection].Capabilities[SelectSlides[SelectSlideWebcamCapabilities].Selection].Height;
_Config.Framerate = d[SelectSlides[SelectSlideWebcamDevices].Selection].Capabilities[SelectSlides[SelectSlideWebcamCapabilities].Selection].Framerate;
CWebcam.Close();
CWebcam.Select(_Config);
@@ -247,15 +247,15 @@ namespace Vocaluxe.Screens
private void OnCapabilitiesEvent()
{
if (SelectSlides[htSelectSlides(SelectSlideWebcamCapabilities)].Selection != _CapabilityNr)
if (SelectSlides[SelectSlideWebcamCapabilities].Selection != _CapabilityNr)
{
_CapabilityNr = SelectSlides[htSelectSlides(SelectSlideWebcamCapabilities)].Selection;
_CapabilityNr = SelectSlides[SelectSlideWebcamCapabilities].Selection;
SWebcamDevice[] d = CWebcam.GetDevices();
_Config.MonikerString = d[SelectSlides[htSelectSlides(SelectSlideWebcamDevices)].Selection].MonikerString;
_Config.Width = d[SelectSlides[htSelectSlides(SelectSlideWebcamDevices)].Selection].Capabilities[SelectSlides[htSelectSlides(SelectSlideWebcamCapabilities)].Selection].Width;
_Config.Height = d[SelectSlides[htSelectSlides(SelectSlideWebcamDevices)].Selection].Capabilities[SelectSlides[htSelectSlides(SelectSlideWebcamCapabilities)].Selection].Height;
_Config.Framerate = d[SelectSlides[htSelectSlides(SelectSlideWebcamDevices)].Selection].Capabilities[SelectSlides[htSelectSlides(SelectSlideWebcamCapabilities)].Selection].Framerate;
_Config.MonikerString = d[SelectSlides[SelectSlideWebcamDevices].Selection].MonikerString;
_Config.Width = d[SelectSlides[SelectSlideWebcamDevices].Selection].Capabilities[SelectSlides[SelectSlideWebcamCapabilities].Selection].Width;
_Config.Height = d[SelectSlides[SelectSlideWebcamDevices].Selection].Capabilities[SelectSlides[SelectSlideWebcamCapabilities].Selection].Height;
_Config.Framerate = d[SelectSlides[SelectSlideWebcamDevices].Selection].Capabilities[SelectSlides[SelectSlideWebcamCapabilities].Selection].Framerate;
CWebcam.Close();
CWebcam.Select(_Config);
+29 -29
View File
@@ -64,16 +64,16 @@ namespace Vocaluxe.Screens
break;
case Keys.Enter:
if (Buttons[htButtons(ButtonStart)].Selected)
if (Buttons[ButtonStart].Selected)
StartPartyMode();
if (Buttons[htButtons(ButtonExit)].Selected)
if (Buttons[ButtonExit].Selected)
CGraphics.FadeTo(EScreens.ScreenMain);
break;
case Keys.Left:
case Keys.Right:
if (SelectSlides[htSelectSlides(SelectSlideModes)].Selected)
if (SelectSlides[SelectSlideModes].Selected)
UpdateSelection();
break;
}
@@ -87,13 +87,13 @@ namespace Vocaluxe.Screens
if (MouseEvent.LB && IsMouseOver(MouseEvent))
{
if (Buttons[htButtons(ButtonStart)].Selected)
if (Buttons[ButtonStart].Selected)
StartPartyMode();
if (Buttons[htButtons(ButtonExit)].Selected)
if (Buttons[ButtonExit].Selected)
CGraphics.FadeTo(EScreens.ScreenMain);
if (SelectSlides[htSelectSlides(SelectSlideModes)].Selected)
if (SelectSlides[SelectSlideModes].Selected)
UpdateSelection();
}
@@ -111,15 +111,15 @@ namespace Vocaluxe.Screens
_PartyModeInfos = CParty.GetPartyModeInfos();
SelectSlides[htSelectSlides(SelectSlideModes)].Clear();
SelectSlides[SelectSlideModes].Clear();
foreach (SPartyModeInfos info in _PartyModeInfos)
{
SelectSlides[htSelectSlides(SelectSlideModes)].AddValue(info.Name, info.PartyModeID);
SelectSlides[SelectSlideModes].AddValue(info.Name, info.PartyModeID);
}
SelectSlides[htSelectSlides(SelectSlideModes)].Selection = 0;
SelectSlides[SelectSlideModes].Selection = 0;
UpdateSelection();
SetInteractionToSelectSlide(SelectSlides[htSelectSlides(SelectSlideModes)]);
SetInteractionToSelectSlide(SelectSlides[SelectSlideModes]);
}
public override bool UpdateGame()
@@ -144,49 +144,49 @@ namespace Vocaluxe.Screens
if (_PartyModeInfos.Count == 0)
return;
int index = SelectSlides[htSelectSlides(SelectSlideModes)].Selection;
int index = SelectSlides[SelectSlideModes].Selection;
if (index >= _PartyModeInfos.Count)
return;
//Description
Texts[htTexts(TextDescription)].Text = _PartyModeInfos[index].Description;
Texts[htTexts(TextDescription)].TranslationID = _PartyModeInfos[index].PartyModeID;
Texts[TextDescription].Text = _PartyModeInfos[index].Description;
Texts[TextDescription].TranslationID = _PartyModeInfos[index].PartyModeID;
//TargetAudience
Texts[htTexts(TextTargetAudience)].TranslationID = _PartyModeInfos[index].PartyModeID;
Texts[htTexts(TextTargetAudience)].Text = _PartyModeInfos[index].TargetAudience;
Texts[TextTargetAudience].TranslationID = _PartyModeInfos[index].PartyModeID;
Texts[TextTargetAudience].Text = _PartyModeInfos[index].TargetAudience;
//NumTeams
if (_PartyModeInfos[index].MaxTeams == 0)
Texts[htTexts(TextNumTeams)].Text = "TR_SCREENPARTY_NOTEAMS";
Texts[TextNumTeams].Text = "TR_SCREENPARTY_NOTEAMS";
else if (_PartyModeInfos[index].MaxTeams == _PartyModeInfos[index].MinTeams)
Texts[htTexts(TextNumTeams)].Text = _PartyModeInfos[index].MaxTeams.ToString();
Texts[TextNumTeams].Text = _PartyModeInfos[index].MaxTeams.ToString();
else if (_PartyModeInfos[index].MaxTeams > _PartyModeInfos[index].MinTeams)
Texts[htTexts(TextNumTeams)].Text = _PartyModeInfos[index].MinTeams + " - " + _PartyModeInfos[index].MaxTeams;
Texts[TextNumTeams].Text = _PartyModeInfos[index].MinTeams + " - " + _PartyModeInfos[index].MaxTeams;
//NumPlayers
if (_PartyModeInfos[index].MaxPlayers == _PartyModeInfos[index].MinPlayers)
Texts[htTexts(TextNumPlayers)].Text = _PartyModeInfos[index].MaxTeams.ToString();
Texts[TextNumPlayers].Text = _PartyModeInfos[index].MaxTeams.ToString();
else if (_PartyModeInfos[index].MaxPlayers > _PartyModeInfos[index].MinPlayers)
Texts[htTexts(TextNumPlayers)].Text = _PartyModeInfos[index].MinPlayers + " - " + _PartyModeInfos[index].MaxPlayers;
Texts[TextNumPlayers].Text = _PartyModeInfos[index].MinPlayers + " - " + _PartyModeInfos[index].MaxPlayers;
//Author
Texts[htTexts(TextAuthor)].Text = _PartyModeInfos[index].Author;
Texts[htTexts(TextAuthor)].TranslationID = _PartyModeInfos[index].PartyModeID;
Texts[TextAuthor].Text = _PartyModeInfos[index].Author;
Texts[TextAuthor].TranslationID = _PartyModeInfos[index].PartyModeID;
//Version
Texts[htTexts(TextVersion)].Text = _PartyModeInfos[index].VersionMajor + "." + _PartyModeInfos[index].VersionMinor;
Texts[htTexts(TextVersion)].TranslationID = _PartyModeInfos[index].PartyModeID;
Texts[TextVersion].Text = _PartyModeInfos[index].VersionMajor + "." + _PartyModeInfos[index].VersionMinor;
Texts[TextVersion].TranslationID = _PartyModeInfos[index].PartyModeID;
if (!_PartyModeInfos[index].Playable)
{
Buttons[htButtons(ButtonStart)].Visible = false;
Texts[htTexts(TextError)].Visible = true;
Buttons[ButtonStart].Visible = false;
Texts[TextError].Visible = true;
}
else
{
Buttons[htButtons(ButtonStart)].Visible = true;
Texts[htTexts(TextError)].Visible = false;
Buttons[ButtonStart].Visible = true;
Texts[TextError].Visible = false;
}
}
@@ -195,7 +195,7 @@ namespace Vocaluxe.Screens
if (_PartyModeInfos.Count == 0)
return;
int index = SelectSlides[htSelectSlides(SelectSlideModes)].Selection;
int index = SelectSlides[SelectSlideModes].Selection;
if (index >= _PartyModeInfos.Count)
return;
+94 -94
View File
@@ -65,16 +65,16 @@ namespace Vocaluxe.Screens
{
base.LoadTheme(XmlPath);
Buttons[htButtons(ButtonSaveSnapshot)].Visible = false;
Buttons[htButtons(ButtonDiscardSnapshot)].Visible = false;
Buttons[htButtons(ButtonTakeSnapshot)].Visible = false;
Buttons[ButtonSaveSnapshot].Visible = false;
Buttons[ButtonDiscardSnapshot].Visible = false;
Buttons[ButtonTakeSnapshot].Visible = false;
if (CWebcam.GetDevices().Length > 0)
Buttons[htButtons(ButtonWebcam)].Visible = true;
Buttons[ButtonWebcam].Visible = true;
else
Buttons[htButtons(ButtonWebcam)].Visible = false;
SelectSlides[htSelectSlides(SelectSlideDifficulty)].SetValues<EGameDifficulty>(0);
SelectSlides[htSelectSlides(SelectSlideGuestProfile)].SetValues<EOffOn>(0);
SelectSlides[htSelectSlides(SelectSlideActive)].SetValues<EOffOn>(0);
Buttons[ButtonWebcam].Visible = false;
SelectSlides[SelectSlideDifficulty].SetValues<EGameDifficulty>(0);
SelectSlides[SelectSlideGuestProfile].SetValues<EOffOn>(0);
SelectSlides[SelectSlideActive].SetValues<EOffOn>(0);
}
@@ -90,8 +90,8 @@ namespace Vocaluxe.Screens
case EEditMode.None:
break;
case EEditMode.PlayerName:
SelectSlides[htSelectSlides(SelectSlideProfiles)].RenameValue(
CProfiles.AddGetPlayerName(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection, KeyEvent.Unicode));
SelectSlides[SelectSlideProfiles].RenameValue(
CProfiles.AddGetPlayerName(SelectSlides[SelectSlideProfiles].Selection, KeyEvent.Unicode));
break;
default:
break;
@@ -106,34 +106,34 @@ namespace Vocaluxe.Screens
break;
case Keys.Enter:
if (Buttons[htButtons(ButtonExit)].Selected)
if (Buttons[ButtonExit].Selected)
{
CGraphics.FadeTo(EScreens.ScreenMain);
} else if (Buttons[htButtons(ButtonSave)].Selected)
} else if (Buttons[ButtonSave].Selected)
{
SaveProfiles();
} else if (Buttons[htButtons(ButtonNew)].Selected)
} else if (Buttons[ButtonNew].Selected)
{
NewProfile();
} else if (Buttons[htButtons(ButtonPlayerName)].Selected)
} else if (Buttons[ButtonPlayerName].Selected)
{
if (CProfiles.NumProfiles > 0 && _EditMode != EEditMode.PlayerName)
_EditMode = EEditMode.PlayerName;
else
_EditMode = EEditMode.None;
} else if (Buttons[htButtons(ButtonDelete)].Selected)
} else if (Buttons[ButtonDelete].Selected)
{
DeleteProfile();
} else if (Buttons[htButtons(ButtonWebcam)].Selected && CWebcam.GetDevices().Length > 0)
} else if (Buttons[ButtonWebcam].Selected && CWebcam.GetDevices().Length > 0)
{
OnWebcam();
} else if (Buttons[htButtons(ButtonSaveSnapshot)].Selected && CWebcam.GetDevices().Length > 0)
} else if (Buttons[ButtonSaveSnapshot].Selected && CWebcam.GetDevices().Length > 0)
{
OnSaveSnapshot();
} else if (Buttons[htButtons(ButtonDiscardSnapshot)].Selected && CWebcam.GetDevices().Length > 0)
} else if (Buttons[ButtonDiscardSnapshot].Selected && CWebcam.GetDevices().Length > 0)
{
OnDiscardSnapshot();
} else if (Buttons[htButtons(ButtonTakeSnapshot)].Selected && CWebcam.GetDevices().Length > 0)
} else if (Buttons[ButtonTakeSnapshot].Selected && CWebcam.GetDevices().Length > 0)
{
OnTakeSnapshot();
}
@@ -142,8 +142,8 @@ namespace Vocaluxe.Screens
case Keys.Back:
if (_EditMode == EEditMode.PlayerName)
{
SelectSlides[htSelectSlides(SelectSlideProfiles)].RenameValue(
CProfiles.GetDeleteCharInPlayerName(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection));
SelectSlides[SelectSlideProfiles].RenameValue(
CProfiles.GetDeleteCharInPlayerName(SelectSlides[SelectSlideProfiles].Selection));
}
else
CGraphics.FadeTo(EScreens.ScreenMain);
@@ -153,22 +153,22 @@ namespace Vocaluxe.Screens
DeleteProfile();
break;
}
if (SelectSlides[htSelectSlides(SelectSlideDifficulty)].Selected)
if (SelectSlides[SelectSlideDifficulty].Selected)
{
CProfiles.SetDifficulty(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection,
(EGameDifficulty)SelectSlides[htSelectSlides(SelectSlideDifficulty)].Selection);
} else if (SelectSlides[htSelectSlides(SelectSlideAvatars)].Selected)
CProfiles.SetDifficulty(SelectSlides[SelectSlideProfiles].Selection,
(EGameDifficulty)SelectSlides[SelectSlideDifficulty].Selection);
} else if (SelectSlides[SelectSlideAvatars].Selected)
{
CProfiles.SetAvatar(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection,
SelectSlides[htSelectSlides(SelectSlideAvatars)].Selection);
} else if (SelectSlides[htSelectSlides(SelectSlideGuestProfile)].Selected)
CProfiles.SetAvatar(SelectSlides[SelectSlideProfiles].Selection,
SelectSlides[SelectSlideAvatars].Selection);
} else if (SelectSlides[SelectSlideGuestProfile].Selected)
{
CProfiles.SetGuestProfile(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection,
(EOffOn)SelectSlides[htSelectSlides(SelectSlideGuestProfile)].Selection);
} else if (SelectSlides[htSelectSlides(SelectSlideActive)].Selected)
CProfiles.SetGuestProfile(SelectSlides[SelectSlideProfiles].Selection,
(EOffOn)SelectSlides[SelectSlideGuestProfile].Selection);
} else if (SelectSlides[SelectSlideActive].Selected)
{
CProfiles.SetActive(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection,
(EOffOn)SelectSlides[htSelectSlides(SelectSlideActive)].Selection);
CProfiles.SetActive(SelectSlides[SelectSlideProfiles].Selection,
(EOffOn)SelectSlides[SelectSlideActive].Selection);
}
}
@@ -182,51 +182,51 @@ namespace Vocaluxe.Screens
if (MouseEvent.LB && IsMouseOver(MouseEvent))
{
if (Buttons[htButtons(ButtonExit)].Selected)
if (Buttons[ButtonExit].Selected)
{
CGraphics.FadeTo(EScreens.ScreenMain);
} else if (Buttons[htButtons(ButtonSave)].Selected)
} else if (Buttons[ButtonSave].Selected)
{
SaveProfiles();
} else if (Buttons[htButtons(ButtonNew)].Selected)
} else if (Buttons[ButtonNew].Selected)
{
NewProfile();
} else if (Buttons[htButtons(ButtonDelete)].Selected) {
} else if (Buttons[ButtonDelete].Selected) {
DeleteProfile();
} else if (Buttons[htButtons(ButtonPlayerName)].Selected)
} else if (Buttons[ButtonPlayerName].Selected)
{
if (CProfiles.NumProfiles > 0 && _EditMode != EEditMode.PlayerName)
_EditMode = EEditMode.PlayerName;
else
_EditMode = EEditMode.None;
} else if (SelectSlides[htSelectSlides(SelectSlideDifficulty)].Selected)
} else if (SelectSlides[SelectSlideDifficulty].Selected)
{
CProfiles.SetDifficulty(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection,
(EGameDifficulty)SelectSlides[htSelectSlides(SelectSlideDifficulty)].Selection);
} else if (SelectSlides[htSelectSlides(SelectSlideAvatars)].Selected)
CProfiles.SetDifficulty(SelectSlides[SelectSlideProfiles].Selection,
(EGameDifficulty)SelectSlides[SelectSlideDifficulty].Selection);
} else if (SelectSlides[SelectSlideAvatars].Selected)
{
CProfiles.SetAvatar(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection,
SelectSlides[htSelectSlides(SelectSlideAvatars)].Selection);
CProfiles.SetAvatar(SelectSlides[SelectSlideProfiles].Selection,
SelectSlides[SelectSlideAvatars].Selection);
if (CWebcam.GetDevices().Length > 0 && _WebcamTexture.index > 0)
OnDiscardSnapshot();
} else if (SelectSlides[htSelectSlides(SelectSlideGuestProfile)].Selected)
} else if (SelectSlides[SelectSlideGuestProfile].Selected)
{
CProfiles.SetGuestProfile(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection,
(EOffOn)SelectSlides[htSelectSlides(SelectSlideGuestProfile)].Selection);
} else if (SelectSlides[htSelectSlides(SelectSlideActive)].Selected)
CProfiles.SetGuestProfile(SelectSlides[SelectSlideProfiles].Selection,
(EOffOn)SelectSlides[SelectSlideGuestProfile].Selection);
} else if (SelectSlides[SelectSlideActive].Selected)
{
CProfiles.SetActive(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection,
(EOffOn)SelectSlides[htSelectSlides(SelectSlideActive)].Selection);
} else if (Buttons[htButtons(ButtonWebcam)].Selected && CWebcam.GetDevices().Length > 0)
CProfiles.SetActive(SelectSlides[SelectSlideProfiles].Selection,
(EOffOn)SelectSlides[SelectSlideActive].Selection);
} else if (Buttons[ButtonWebcam].Selected && CWebcam.GetDevices().Length > 0)
{
OnWebcam();
} else if (Buttons[htButtons(ButtonSaveSnapshot)].Selected && CWebcam.GetDevices().Length > 0)
} else if (Buttons[ButtonSaveSnapshot].Selected && CWebcam.GetDevices().Length > 0)
{
OnSaveSnapshot();
} else if (Buttons[htButtons(ButtonDiscardSnapshot)].Selected && CWebcam.GetDevices().Length > 0)
} else if (Buttons[ButtonDiscardSnapshot].Selected && CWebcam.GetDevices().Length > 0)
{
OnDiscardSnapshot();
} else if (Buttons[htButtons(ButtonTakeSnapshot)].Selected && CWebcam.GetDevices().Length > 0)
} else if (Buttons[ButtonTakeSnapshot].Selected && CWebcam.GetDevices().Length > 0)
{
OnTakeSnapshot();
}
@@ -241,10 +241,10 @@ namespace Vocaluxe.Screens
private void OnTakeSnapshot()
{
Buttons[htButtons(ButtonSaveSnapshot)].Visible = true;
Buttons[htButtons(ButtonDiscardSnapshot)].Visible = true;
Buttons[htButtons(ButtonWebcam)].Visible = false;
Buttons[htButtons(ButtonTakeSnapshot)].Visible = false;
Buttons[ButtonSaveSnapshot].Visible = true;
Buttons[ButtonDiscardSnapshot].Visible = true;
Buttons[ButtonWebcam].Visible = false;
Buttons[ButtonTakeSnapshot].Visible = false;
_Snapshot = CWebcam.GetBitmap();
}
@@ -253,10 +253,10 @@ namespace Vocaluxe.Screens
CWebcam.Stop();
CDraw.RemoveTexture(ref _WebcamTexture);
_Snapshot = null;
Buttons[htButtons(ButtonSaveSnapshot)].Visible = false;
Buttons[htButtons(ButtonDiscardSnapshot)].Visible = false;
Buttons[htButtons(ButtonTakeSnapshot)].Visible = false;
Buttons[htButtons(ButtonWebcam)].Visible = true;
Buttons[ButtonSaveSnapshot].Visible = false;
Buttons[ButtonDiscardSnapshot].Visible = false;
Buttons[ButtonTakeSnapshot].Visible = false;
Buttons[ButtonWebcam].Visible = true;
}
private void OnSaveSnapshot()
@@ -278,16 +278,16 @@ namespace Vocaluxe.Screens
{
if (CProfiles.Avatars[j].FileName == (filename + i + ".png"))
{
CProfiles.SetAvatar(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection, j);
CProfiles.SetAvatar(SelectSlides[SelectSlideProfiles].Selection, j);
break;
}
}
Buttons[htButtons(ButtonSaveSnapshot)].Visible = false;
Buttons[htButtons(ButtonDiscardSnapshot)].Visible = false;
Buttons[htButtons(ButtonTakeSnapshot)].Visible = false;
Buttons[htButtons(ButtonWebcam)].Visible = true;
Buttons[ButtonSaveSnapshot].Visible = false;
Buttons[ButtonDiscardSnapshot].Visible = false;
Buttons[ButtonTakeSnapshot].Visible = false;
Buttons[ButtonWebcam].Visible = true;
}
private void OnWebcam()
@@ -295,38 +295,38 @@ namespace Vocaluxe.Screens
_Snapshot = null;
CWebcam.Start();
CWebcam.GetFrame(ref _WebcamTexture);
Buttons[htButtons(ButtonSaveSnapshot)].Visible = false;
Buttons[htButtons(ButtonDiscardSnapshot)].Visible = false;
Buttons[htButtons(ButtonTakeSnapshot)].Visible = true;
Buttons[htButtons(ButtonWebcam)].Visible = false;
Buttons[ButtonSaveSnapshot].Visible = false;
Buttons[ButtonDiscardSnapshot].Visible = false;
Buttons[ButtonTakeSnapshot].Visible = true;
Buttons[ButtonWebcam].Visible = false;
}
public override bool UpdateGame()
{
if (SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection > -1)
if (SelectSlides[SelectSlideProfiles].Selection > -1)
{
Buttons[htButtons(ButtonPlayerName)].Text.Text = CProfiles.GetPlayerName(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection);
Buttons[ButtonPlayerName].Text.Text = CProfiles.GetPlayerName(SelectSlides[SelectSlideProfiles].Selection);
if (_EditMode == EEditMode.PlayerName)
Buttons[htButtons(ButtonPlayerName)].Text.Text += "|";
Buttons[ButtonPlayerName].Text.Text += "|";
SelectSlides[htSelectSlides(SelectSlideDifficulty)].Selection = (int)CProfiles.GetDifficulty(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection);
SelectSlides[htSelectSlides(SelectSlideGuestProfile)].Selection = (int)CProfiles.GetGuestProfile(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection);
SelectSlides[htSelectSlides(SelectSlideActive)].Selection = (int)CProfiles.GetActive(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection);
SelectSlides[SelectSlideDifficulty].Selection = (int)CProfiles.GetDifficulty(SelectSlides[SelectSlideProfiles].Selection);
SelectSlides[SelectSlideGuestProfile].Selection = (int)CProfiles.GetGuestProfile(SelectSlides[SelectSlideProfiles].Selection);
SelectSlides[SelectSlideActive].Selection = (int)CProfiles.GetActive(SelectSlides[SelectSlideProfiles].Selection);
int avatarNr = CProfiles.GetAvatarNr(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection);
SelectSlides[htSelectSlides(SelectSlideAvatars)].Selection = avatarNr;
int avatarNr = CProfiles.GetAvatarNr(SelectSlides[SelectSlideProfiles].Selection);
SelectSlides[SelectSlideAvatars].Selection = avatarNr;
if (CWebcam.GetDevices().Length > 0 && _WebcamTexture.index > 0)
{
if(_Snapshot == null)
CWebcam.GetFrame(ref _WebcamTexture);
Statics[htStatics(StaticAvatar)].Texture = _WebcamTexture;
Statics[StaticAvatar].Texture = _WebcamTexture;
RectangleF bounds = new RectangleF(_WebcamTexture.rect.X, _WebcamTexture.rect.Y, _WebcamTexture.rect.W, _WebcamTexture.rect.H);
RectangleF rect = new RectangleF(0f, 0f, _WebcamTexture.rect.W, _WebcamTexture.rect.H);
CHelper.SetRect(bounds, ref rect, rect.Width / rect.Height, EAspect.Crop);
}
else
Statics[htStatics(StaticAvatar)].Texture = CProfiles.Avatars[avatarNr].Texture;
Statics[StaticAvatar].Texture = CProfiles.Avatars[avatarNr].Texture;
}
return true;
@@ -364,7 +364,7 @@ namespace Vocaluxe.Screens
private void DeleteProfile()
{
CProfiles.DeleteProfile(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection);
CProfiles.DeleteProfile(SelectSlides[SelectSlideProfiles].Selection);
LoadProfiles();
UpdateGame();
}
@@ -372,28 +372,28 @@ namespace Vocaluxe.Screens
private void LoadProfiles()
{
_EditMode = EEditMode.None;
SelectSlides[htSelectSlides(SelectSlideProfiles)].Clear();
SelectSlides[SelectSlideProfiles].Clear();
for (int i = 0; i < CProfiles.NumProfiles; i++)
{
SelectSlides[htSelectSlides(SelectSlideProfiles)].AddValue(CProfiles.GetPlayerName(i));
SelectSlides[SelectSlideProfiles].AddValue(CProfiles.GetPlayerName(i));
}
if (CProfiles.NumProfiles > 0 && CProfiles.NumAvatars > 0)
{
SelectSlides[htSelectSlides(SelectSlideDifficulty)].Selection = (int)CProfiles.GetDifficulty(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection);
SelectSlides[htSelectSlides(SelectSlideGuestProfile)].Selection = (int)CProfiles.GetGuestProfile(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection);
SelectSlides[htSelectSlides(SelectSlideActive)].Selection = (int)CProfiles.GetActive(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection);
SelectSlides[htSelectSlides(SelectSlideAvatars)].Selection = CProfiles.GetAvatarNr(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection);
SelectSlides[SelectSlideDifficulty].Selection = (int)CProfiles.GetDifficulty(SelectSlides[SelectSlideProfiles].Selection);
SelectSlides[SelectSlideGuestProfile].Selection = (int)CProfiles.GetGuestProfile(SelectSlides[SelectSlideProfiles].Selection);
SelectSlides[SelectSlideActive].Selection = (int)CProfiles.GetActive(SelectSlides[SelectSlideProfiles].Selection);
SelectSlides[SelectSlideAvatars].Selection = CProfiles.GetAvatarNr(SelectSlides[SelectSlideProfiles].Selection);
}
}
private void LoadAvatars()
{
SelectSlides[htSelectSlides(SelectSlideAvatars)].Clear();
SelectSlides[SelectSlideAvatars].Clear();
for (int i = 0; i < CProfiles.NumAvatars; i++)
{
SelectSlides[htSelectSlides(SelectSlideAvatars)].AddValue(CProfiles.Avatars[i].FileName);
SelectSlides[SelectSlideAvatars].AddValue(CProfiles.Avatars[i].FileName);
}
}
@@ -402,12 +402,12 @@ namespace Vocaluxe.Screens
_EditMode = EEditMode.None;
CProfiles.NewProfile();
LoadProfiles();
SelectSlides[htSelectSlides(SelectSlideProfiles)].LastValue();
SelectSlides[SelectSlideProfiles].LastValue();
CProfiles.SetAvatar(SelectSlides[htSelectSlides(SelectSlideProfiles)].Selection,
SelectSlides[htSelectSlides(SelectSlideAvatars)].Selection);
CProfiles.SetAvatar(SelectSlides[SelectSlideProfiles].Selection,
SelectSlides[SelectSlideAvatars].Selection);
SetInteractionToButton(Buttons[htButtons(ButtonPlayerName)]);
SetInteractionToButton(Buttons[ButtonPlayerName]);
_EditMode = EEditMode.PlayerName;
}
}
+36 -36
View File
@@ -158,15 +158,15 @@ namespace Vocaluxe.Screens
{
StaticPointsBarDrawnPoints[p] = player[p].Points;
}
string direction = (string) ScreenSettings[htScreenSettings(ScreenSettingAnimationDirection)].GetValue();
string direction = (string) ScreenSettings[ScreenSettingAnimationDirection].GetValue();
if (direction.ToLower() == "vertical")
{
Statics[htStatics(StaticPointsBar[p, CGame.NumPlayer - 1])].Rect.W = ((float)StaticPointsBarDrawnPoints[p]) * (Statics[htStatics(StaticPointsBarBG[p, CGame.NumPlayer - 1])].Rect.W / 10000);
Statics[StaticPointsBar[p, CGame.NumPlayer - 1]].Rect.W = ((float)StaticPointsBarDrawnPoints[p]) * (Statics[StaticPointsBarBG[p, CGame.NumPlayer - 1]].Rect.W / 10000);
}
else
{
Statics[htStatics(StaticPointsBar[p, CGame.NumPlayer - 1])].Rect.H = ((float)StaticPointsBarDrawnPoints[p]) * (Statics[htStatics(StaticPointsBarBG[p, CGame.NumPlayer - 1])].Rect.H / 10000);
Statics[htStatics(StaticPointsBar[p, CGame.NumPlayer - 1])].Rect.Y = Statics[htStatics(StaticPointsBarBG[p, CGame.NumPlayer - 1])].Rect.H + Statics[htStatics(StaticPointsBarBG[p, CGame.NumPlayer - 1])].Rect.Y - Statics[htStatics(StaticPointsBar[p, CGame.NumPlayer - 1])].Rect.H;
Statics[StaticPointsBar[p, CGame.NumPlayer - 1]].Rect.H = ((float)StaticPointsBarDrawnPoints[p]) * (Statics[StaticPointsBarBG[p, CGame.NumPlayer - 1]].Rect.H / 10000);
Statics[StaticPointsBar[p, CGame.NumPlayer - 1]].Rect.Y = Statics[StaticPointsBarBG[p, CGame.NumPlayer - 1]].Rect.H + Statics[StaticPointsBarBG[p, CGame.NumPlayer - 1]].Rect.Y - Statics[StaticPointsBar[p, CGame.NumPlayer - 1]].Rect.H;
}
}
}
@@ -285,16 +285,16 @@ namespace Vocaluxe.Screens
if (song == null)
return;
Texts[htTexts(TextSong)].Text = song.Artist + " - " + song.Title;
Texts[TextSong].Text = song.Artist + " - " + song.Title;
if (_Points.NumRounds > 1)
{
Texts[htTexts(TextSong)].Text += " (" + _Round + "/" + _Points.NumRounds + ")";
Texts[TextSong].Text += " (" + _Round + "/" + _Points.NumRounds + ")";
}
player = _Points.GetPlayer(_Round - 1, CGame.NumPlayer);
}
else
{
Texts[htTexts(TextSong)].Text = "TR_SCREENSCORE_OVERALLSCORE";
Texts[TextSong].Text = "TR_SCREENSCORE_OVERALLSCORE";
for (int i = 0; i < CGame.NumRounds; i++)
{
SPlayer[] points = _Points.GetPlayer(i, CGame.NumPlayer);
@@ -320,52 +320,52 @@ namespace Vocaluxe.Screens
if (song != null)
{
if (!song.IsDuet)
Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Text = player[p].Name;
Texts[TextNames[p, CGame.NumPlayer - 1]].Text = player[p].Name;
else
if (player[p].LineNr == 0 && song.DuetPart1 != "Part 1")
Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Text = player[p].Name + " (" + song.DuetPart1 + ")";
Texts[TextNames[p, CGame.NumPlayer - 1]].Text = player[p].Name + " (" + song.DuetPart1 + ")";
else if (player[p].LineNr == 1 && song.DuetPart2 != "Part 2")
Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Text = player[p].Name + " (" + song.DuetPart2 + ")";
Texts[TextNames[p, CGame.NumPlayer - 1]].Text = player[p].Name + " (" + song.DuetPart2 + ")";
else
Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Text = player[p].Name;
Texts[TextNames[p, CGame.NumPlayer - 1]].Text = player[p].Name;
}
else
Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Text = player[p].Name;
Texts[TextNames[p, CGame.NumPlayer - 1]].Text = player[p].Name;
if (CGame.NumPlayer < (int)ScreenSettings[htScreenSettings(ScreenSettingShortScore)].GetValue())
Texts[htTexts(TextScores[p, CGame.NumPlayer - 1])].Text = ((int)Math.Round(player[p].Points)).ToString("0000") + " " + CLanguage.Translate("TR_SCREENSCORE_POINTS");
if (CGame.NumPlayer < (int)ScreenSettings[ScreenSettingShortScore].GetValue())
Texts[TextScores[p, CGame.NumPlayer - 1]].Text = ((int)Math.Round(player[p].Points)).ToString("0000") + " " + CLanguage.Translate("TR_SCREENSCORE_POINTS");
else
Texts[htTexts(TextScores[p, CGame.NumPlayer - 1])].Text = ((int)Math.Round(player[p].Points)).ToString("0000");
if (CGame.NumPlayer < (int)ScreenSettings[htScreenSettings(ScreenSettingShortDifficulty)].GetValue())
Texts[htTexts(TextDifficulty[p, CGame.NumPlayer - 1])].Text = CLanguage.Translate("TR_SCREENSCORE_GAMEDIFFICULTY") + ": " + CLanguage.Translate(player[p].Difficulty.ToString());
Texts[TextScores[p, CGame.NumPlayer - 1]].Text = ((int)Math.Round(player[p].Points)).ToString("0000");
if (CGame.NumPlayer < (int)ScreenSettings[ScreenSettingShortDifficulty].GetValue())
Texts[TextDifficulty[p, CGame.NumPlayer - 1]].Text = CLanguage.Translate("TR_SCREENSCORE_GAMEDIFFICULTY") + ": " + CLanguage.Translate(player[p].Difficulty.ToString());
else
Texts[htTexts(TextDifficulty[p, CGame.NumPlayer - 1])].Text = CLanguage.Translate(player[p].Difficulty.ToString());
if (CGame.NumPlayer < (int)ScreenSettings[htScreenSettings(ScreenSettingShortRating)].GetValue())
Texts[htTexts(TextRatings[p, CGame.NumPlayer - 1])].Text = CLanguage.Translate("TR_SCREENSCORE_RATING") + ": " + CLanguage.Translate(GetRating((int)Math.Round(player[p].Points)));
Texts[TextDifficulty[p, CGame.NumPlayer - 1]].Text = CLanguage.Translate(player[p].Difficulty.ToString());
if (CGame.NumPlayer < (int)ScreenSettings[ScreenSettingShortRating].GetValue())
Texts[TextRatings[p, CGame.NumPlayer - 1]].Text = CLanguage.Translate("TR_SCREENSCORE_RATING") + ": " + CLanguage.Translate(GetRating((int)Math.Round(player[p].Points)));
else
Texts[htTexts(TextRatings[p, CGame.NumPlayer - 1])].Text = CLanguage.Translate(GetRating((int)Math.Round(player[p].Points)));
Texts[TextRatings[p, CGame.NumPlayer - 1]].Text = CLanguage.Translate(GetRating((int)Math.Round(player[p].Points)));
StaticPointsBarDrawnPoints[p] = 0.0;
string direction = (string)ScreenSettings[htScreenSettings(ScreenSettingAnimationDirection)].GetValue();
string direction = (string)ScreenSettings[ScreenSettingAnimationDirection].GetValue();
if (direction.ToLower() == "vertical")
{
Statics[htStatics(StaticPointsBar[p, CGame.NumPlayer - 1])].Rect.W = 0;
Statics[StaticPointsBar[p, CGame.NumPlayer - 1]].Rect.W = 0;
}
else
{
Statics[htStatics(StaticPointsBar[p, CGame.NumPlayer - 1])].Rect.H = 0;
Statics[htStatics(StaticPointsBar[p, CGame.NumPlayer - 1])].Rect.Y = Statics[htStatics(StaticPointsBarBG[p, CGame.NumPlayer - 1])].Rect.H + Statics[htStatics(StaticPointsBarBG[p, CGame.NumPlayer - 1])].Rect.Y - Statics[htStatics(StaticPointsBar[p, CGame.NumPlayer - 1])].Rect.H;
Statics[StaticPointsBar[p, CGame.NumPlayer - 1]].Rect.H = 0;
Statics[StaticPointsBar[p, CGame.NumPlayer - 1]].Rect.Y = Statics[StaticPointsBarBG[p, CGame.NumPlayer - 1]].Rect.H + Statics[StaticPointsBarBG[p, CGame.NumPlayer - 1]].Rect.Y - Statics[StaticPointsBar[p, CGame.NumPlayer - 1]].Rect.H;
}
if (player[p].ProfileID >= 0 && player[p].ProfileID < CProfiles.NumProfiles)
Statics[htStatics(StaticAvatar[p, CGame.NumPlayer - 1])].Texture = CProfiles.Profiles[player[p].ProfileID].Avatar.Texture;
Statics[StaticAvatar[p, CGame.NumPlayer - 1]].Texture = CProfiles.Profiles[player[p].ProfileID].Avatar.Texture;
}
if (CConfig.ScoreAnimationTime < 1)
{
for (int p = 0; p < CGame.NumPlayer; p++)
{
Statics[htStatics(StaticPointsBar[p, CGame.NumPlayer - 1])].Rect.H = ((float)player[p].Points) * (Statics[htStatics(StaticPointsBarBG[p, CGame.NumPlayer - 1])].Rect.H / 10000);
Statics[htStatics(StaticPointsBar[p, CGame.NumPlayer - 1])].Rect.Y = Statics[htStatics(StaticPointsBarBG[p, CGame.NumPlayer - 1])].Rect.H + Statics[htStatics(StaticPointsBarBG[p, CGame.NumPlayer - 1])].Rect.Y - Statics[htStatics(StaticPointsBar[p, CGame.NumPlayer - 1])].Rect.H;
Statics[StaticPointsBar[p, CGame.NumPlayer - 1]].Rect.H = ((float)player[p].Points) * (Statics[StaticPointsBarBG[p, CGame.NumPlayer - 1]].Rect.H / 10000);
Statics[StaticPointsBar[p, CGame.NumPlayer - 1]].Rect.Y = Statics[StaticPointsBarBG[p, CGame.NumPlayer - 1]].Rect.H + Statics[StaticPointsBarBG[p, CGame.NumPlayer - 1]].Rect.Y - Statics[StaticPointsBar[p, CGame.NumPlayer - 1]].Rect.H;
StaticPointsBarDrawnPoints[p] = player[p].Points;
}
}
@@ -382,15 +382,15 @@ namespace Vocaluxe.Screens
{
if (player <= numplayer)
{
Texts[htTexts(TextNames[player, numplayer])].Visible = (numplayer + 1 == CGame.NumPlayer);
Texts[htTexts(TextScores[player, numplayer])].Visible = (numplayer + 1 == CGame.NumPlayer);
Texts[htTexts(TextRatings[player, numplayer])].Visible = (numplayer + 1 == CGame.NumPlayer);
Texts[htTexts(TextDifficulty[player, numplayer])].Visible = (numplayer + 1 == CGame.NumPlayer);
Statics[htStatics(StaticPointsBar[player, numplayer])].Visible = (numplayer + 1 == CGame.NumPlayer);
Statics[htStatics(StaticPointsBarBG[player, numplayer])].Visible = (numplayer + 1 == CGame.NumPlayer);
Statics[htStatics(StaticAvatar[player, numplayer])].Visible = (numplayer + 1 == CGame.NumPlayer);
Texts[TextNames[player, numplayer]].Visible = (numplayer + 1 == CGame.NumPlayer);
Texts[TextScores[player, numplayer]].Visible = (numplayer + 1 == CGame.NumPlayer);
Texts[TextRatings[player, numplayer]].Visible = (numplayer + 1 == CGame.NumPlayer);
Texts[TextDifficulty[player, numplayer]].Visible = (numplayer + 1 == CGame.NumPlayer);
Statics[StaticPointsBar[player, numplayer]].Visible = (numplayer + 1 == CGame.NumPlayer);
Statics[StaticPointsBarBG[player, numplayer]].Visible = (numplayer + 1 == CGame.NumPlayer);
Statics[StaticAvatar[player, numplayer]].Visible = (numplayer + 1 == CGame.NumPlayer);
Statics[htStatics(StaticAvatar[player, numplayer])].Texture = new STexture(-1);
Statics[StaticAvatar[player, numplayer]].Texture = new STexture(-1);
}
}
}
+199 -199
View File
@@ -151,17 +151,17 @@ namespace Vocaluxe.Screens
{
base.LoadTheme(XmlPath);
Statics[htStatics(StaticTimeLine)].Visible = false;
Statics[htStatics(StaticTimeLineExpandedNormal)].Visible = false;
Statics[htStatics(StaticTimeLineExpandedHighlighted)].Visible = false;
Statics[htStatics(StaticPauseBG)].Visible = false;
Texts[htTexts(TextPause)].Visible = false;
Statics[StaticTimeLine].Visible = false;
Statics[StaticTimeLineExpandedNormal].Visible = false;
Statics[StaticTimeLineExpandedHighlighted].Visible = false;
Statics[StaticPauseBG].Visible = false;
Texts[TextPause].Visible = false;
Statics[htStatics(StaticPauseBG)].Visible = false;
Texts[htTexts(TextPause)].Visible = false;
Statics[StaticPauseBG].Visible = false;
Texts[TextPause].Visible = false;
Buttons[htButtons(ButtonCancel)].Visible = false;
Buttons[htButtons(ButtonContinue)].Visible = false;
Buttons[ButtonCancel].Visible = false;
Buttons[ButtonContinue].Visible = false;
}
public override bool HandleInput(KeyEvent KeyEvent)
@@ -179,13 +179,13 @@ namespace Vocaluxe.Screens
case Keys.Escape:
TogglePause();
if (_Pause)
SetInteractionToButton(Buttons[htButtons(ButtonCancel)]);
SetInteractionToButton(Buttons[ButtonCancel]);
break;
case Keys.P:
TogglePause();
if (_Pause)
SetInteractionToButton(Buttons[htButtons(ButtonContinue)]);
SetInteractionToButton(Buttons[ButtonContinue]);
break;
case Keys.T:
@@ -230,11 +230,11 @@ namespace Vocaluxe.Screens
}
break;
case Keys.Enter:
if (Buttons[htButtons(ButtonContinue)].Selected && _Pause)
if (Buttons[ButtonContinue].Selected && _Pause)
TogglePause();
if (Buttons[htButtons(ButtonCancel)].Selected && _Pause)
if (Buttons[ButtonCancel].Selected && _Pause)
Stop();
if (Buttons[htButtons(ButtonSkip)].Selected && _Pause)
if (Buttons[ButtonSkip].Selected && _Pause)
{
LoadNextSong();
TogglePause();
@@ -278,18 +278,18 @@ namespace Vocaluxe.Screens
{
TogglePause();
if (_Pause)
SetInteractionToButton(Buttons[htButtons(ButtonContinue)]);
SetInteractionToButton(Buttons[ButtonContinue]);
}
if (MouseEvent.LB && IsMouseOver(MouseEvent) && _Pause)
{
if (Buttons[htButtons(ButtonContinue)].Selected && _Pause)
if (Buttons[ButtonContinue].Selected && _Pause)
TogglePause();
if (Buttons[htButtons(ButtonCancel)].Selected && _Pause)
if (Buttons[ButtonCancel].Selected && _Pause)
Stop();
if (Buttons[htButtons(ButtonSkip)].Selected && _Pause)
if (Buttons[ButtonSkip].Selected && _Pause)
{
LoadNextSong();
TogglePause();
@@ -331,48 +331,48 @@ namespace Vocaluxe.Screens
float[] Alpha = CalcFadingAlpha();
if (Alpha != null)
{
Lyrics[htLyrics(LyricMain)].Alpha = Alpha[0];
Lyrics[htLyrics(LyricSub)].Alpha = Alpha[1];
Lyrics[LyricMain].Alpha = Alpha[0];
Lyrics[LyricSub].Alpha = Alpha[1];
Lyrics[htLyrics(LyricMainTop)].Alpha = Alpha[0];
Lyrics[htLyrics(LyricSubTop)].Alpha = Alpha[1];
Lyrics[LyricMainTop].Alpha = Alpha[0];
Lyrics[LyricSubTop].Alpha = Alpha[1];
Statics[htStatics(StaticLyrics)].Alpha = Alpha[0];
Statics[htStatics(StaticLyricsTop)].Alpha = Alpha[0];
Statics[StaticLyrics].Alpha = Alpha[0];
Statics[StaticLyricsTop].Alpha = Alpha[0];
Statics[htStatics(StaticLyricHelper)].Alpha = Alpha[0];
Statics[htStatics(StaticLyricHelperTop)].Alpha = Alpha[0];
Statics[StaticLyricHelper].Alpha = Alpha[0];
Statics[StaticLyricHelperTop].Alpha = Alpha[0];
for (int p = 0; p < CGame.NumPlayer; p++)
{
SingNotes[htSingNotes(SingBars)].SetAlpha(NoteLines[p], Alpha[CGame.Player[p].LineNr * 2]);
SingNotes[SingBars].SetAlpha(NoteLines[p], Alpha[CGame.Player[p].LineNr * 2]);
if (CConfig.FadePlayerInfo == EFadePlayerInfo.TR_CONFIG_FADEPLAYERINFO_INFO || CConfig.FadePlayerInfo == EFadePlayerInfo.TR_CONFIG_FADEPLAYERINFO_ALL)
{
Statics[htStatics(StaticAvatars[p, CGame.NumPlayer - 1])].Alpha = Alpha[CGame.Player[p].LineNr * 2];
Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Alpha = Alpha[CGame.Player[p].LineNr * 2];
Statics[StaticAvatars[p, CGame.NumPlayer - 1]].Alpha = Alpha[CGame.Player[p].LineNr * 2];
Texts[TextNames[p, CGame.NumPlayer - 1]].Alpha = Alpha[CGame.Player[p].LineNr * 2];
}
if (CConfig.FadePlayerInfo == EFadePlayerInfo.TR_CONFIG_FADEPLAYERINFO_ALL)
{
Statics[htStatics(StaticScores[p, CGame.NumPlayer - 1])].Alpha = Alpha[CGame.Player[p].LineNr * 2];
Statics[htStatics(StaticAvatars[p, CGame.NumPlayer - 1])].Alpha = Alpha[CGame.Player[p].LineNr * 2];
Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Alpha = Alpha[CGame.Player[p].LineNr * 2];
Texts[htTexts(TextScores[p, CGame.NumPlayer - 1])].Alpha = Alpha[CGame.Player[p].LineNr * 2];
Statics[StaticScores[p, CGame.NumPlayer - 1]].Alpha = Alpha[CGame.Player[p].LineNr * 2];
Statics[StaticAvatars[p, CGame.NumPlayer - 1]].Alpha = Alpha[CGame.Player[p].LineNr * 2];
Texts[TextNames[p, CGame.NumPlayer - 1]].Alpha = Alpha[CGame.Player[p].LineNr * 2];
Texts[TextScores[p, CGame.NumPlayer - 1]].Alpha = Alpha[CGame.Player[p].LineNr * 2];
}
}
if (Alpha.Length > 2)
{
Lyrics[htLyrics(LyricMainDuet)].Alpha = Alpha[0];
Lyrics[htLyrics(LyricSubDuet)].Alpha = Alpha[1];
Lyrics[LyricMainDuet].Alpha = Alpha[0];
Lyrics[LyricSubDuet].Alpha = Alpha[1];
Statics[htStatics(StaticLyricsDuet)].Alpha = Alpha[0];
Statics[htStatics(StaticLyricHelperDuet)].Alpha = Alpha[0];
Statics[StaticLyricsDuet].Alpha = Alpha[0];
Statics[StaticLyricHelperDuet].Alpha = Alpha[0];
Lyrics[htLyrics(LyricMain)].Alpha = Alpha[2];
Lyrics[htLyrics(LyricSub)].Alpha = Alpha[3];
Lyrics[LyricMain].Alpha = Alpha[2];
Lyrics[LyricSub].Alpha = Alpha[3];
Statics[htStatics(StaticLyrics)].Alpha = Alpha[2];
Statics[htStatics(StaticLyricHelper)].Alpha = Alpha[2];
Statics[StaticLyrics].Alpha = Alpha[2];
Statics[StaticLyricHelper].Alpha = Alpha[2];
}
}
@@ -381,11 +381,11 @@ namespace Vocaluxe.Screens
{
if (CGame.Player[p].Points < 10000)
{
Texts[htTexts(TextScores[p, CGame.NumPlayer - 1])].Text = CGame.Player[p].Points.ToString("0000");
Texts[TextScores[p, CGame.NumPlayer - 1]].Text = CGame.Player[p].Points.ToString("0000");
}
else
{
Texts[htTexts(TextScores[p, CGame.NumPlayer - 1])].Text = CGame.Player[p].Points.ToString("00000");
Texts[TextScores[p, CGame.NumPlayer - 1]].Text = CGame.Player[p].Points.ToString("00000");
}
}
@@ -419,20 +419,20 @@ namespace Vocaluxe.Screens
_TimeRects.Clear();
SingNotes[htSingNotes(SingBars)].Reset();
SingNotes[SingBars].Reset();
for (int i = 0; i < CSettings.MaxNumPlayer; i++)
{
NoteLines[i] = -1;
}
for (int i = 0; i < Lyrics.Length; i++)
foreach(CLyric lyric in Lyrics)
{
Lyrics[i].LyricStyle = CConfig.LyricStyle;
lyric.LyricStyle = CConfig.LyricStyle;
}
for (int p = 0; p < CGame.NumPlayer; p++)
{
Statics[htStatics(StaticAvatars[p, CGame.NumPlayer - 1])].Aspect = EAspect.Crop;
Statics[StaticAvatars[p, CGame.NumPlayer - 1]].Aspect = EAspect.Crop;
}
SetVisibility();
@@ -496,37 +496,37 @@ namespace Vocaluxe.Screens
switch (CConfig.TimerLook)
{
case ETimerLook.TR_CONFIG_TIMERLOOK_NORMAL:
CDraw.DrawTexture(Statics[htStatics(StaticTimeLine)].Texture, Statics[htStatics(StaticTimeLine)].Rect, new SColorF(1, 1, 1, 1), _TimeLineRect);
CDraw.DrawTexture(Statics[StaticTimeLine].Texture, Statics[StaticTimeLine].Rect, new SColorF(1, 1, 1, 1), _TimeLineRect);
break;
case ETimerLook.TR_CONFIG_TIMERLOOK_EXPANDED:
for (int i = 0; i < _TimeRects.Count; i++)
{
CDraw.DrawTexture(_TimeRects[i].rect.Texture, Statics[htStatics(StaticTimeLine)].Rect, _TimeRects[i].rect.Color, _TimeRects[i].rect.Rect);
CDraw.DrawTexture(_TimeRects[i].rect.Texture, Statics[StaticTimeLine].Rect, _TimeRects[i].rect.Color, _TimeRects[i].rect.Rect);
}
break;
}
Lyrics[htLyrics(LyricSub)].Draw(-100);
Lyrics[htLyrics(LyricMain)].Draw(CGame.Beat);
Lyrics[LyricSub].Draw(-100);
Lyrics[LyricMain].Draw(CGame.Beat);
Lyrics[htLyrics(LyricSubDuet)].Draw(-100);
Lyrics[htLyrics(LyricMainDuet)].Draw(CGame.Beat);
Lyrics[LyricSubDuet].Draw(-100);
Lyrics[LyricMainDuet].Draw(CGame.Beat);
Lyrics[htLyrics(LyricSubTop)].Draw(-100);
Lyrics[htLyrics(LyricMainTop)].Draw(CGame.Beat);
Lyrics[LyricSubTop].Draw(-100);
Lyrics[LyricMainTop].Draw(CGame.Beat);
for (int i = 0; i < CGame.NumPlayer; i++)
{
SingNotes[htSingNotes(SingBars)].Draw(NoteLines[i], CGame.Player[i].SingLine, i);
SingNotes[SingBars].Draw(NoteLines[i], CGame.Player[i].SingLine, i);
}
DrawLyricHelper();
if (_Pause)
{
Statics[htStatics(StaticPauseBG)].ForceDraw();
Texts[htTexts(TextPause)].ForceDraw();
Statics[StaticPauseBG].ForceDraw();
Texts[TextPause].ForceDraw();
foreach (CButton button in Buttons)
button.Draw();
@@ -562,15 +562,15 @@ namespace Vocaluxe.Screens
}
CDraw.RemoveTexture(ref _Background);
Lyrics[htLyrics(LyricMain)].Clear();
Lyrics[htLyrics(LyricSub)].Clear();
Lyrics[htLyrics(LyricMainDuet)].Clear();
Lyrics[htLyrics(LyricSubDuet)].Clear();
Lyrics[htLyrics(LyricMainTop)].Clear();
Lyrics[htLyrics(LyricSubTop)].Clear();
Texts[htTexts(TextSongName)].Text = String.Empty;
Texts[htTexts(TextDuetName1)].Text = String.Empty;
Texts[htTexts(TextDuetName2)].Text = String.Empty;
Lyrics[LyricMain].Clear();
Lyrics[LyricSub].Clear();
Lyrics[LyricMainDuet].Clear();
Lyrics[LyricSubDuet].Clear();
Lyrics[LyricMainTop].Clear();
Lyrics[LyricSubTop].Clear();
Texts[TextSongName].Text = String.Empty;
Texts[TextDuetName1].Text = String.Empty;
Texts[TextDuetName2].Text = String.Empty;
GC.Collect();
}
@@ -601,7 +601,7 @@ namespace Vocaluxe.Screens
int rounds = CGame.GetNumSongs();
if (rounds > 1)
songname += " (" + CGame.RoundNr + "/" + rounds.ToString() + ")";
Texts[htTexts(TextSongName)].Text = songname;
Texts[TextSongName].Text = songname;
_CurrentStream = CSound.Load(song.GetMP3(), true);
CSound.SetStreamVolumeMax(_CurrentStream, CConfig.GameMusicVolume);
@@ -635,13 +635,13 @@ namespace Vocaluxe.Screens
if (song.BackgroundFileName.Length > 0)
_Background = CDraw.AddTexture(Path.Combine(song.Folder, song.BackgroundFileName));
SingNotes[htSingNotes(SingBars)].Reset();
SingNotes[SingBars].Reset();
if (song.IsDuet)
{
Texts[htTexts(TextDuetName1)].Text = song.DuetPart1;
Texts[htTexts(TextDuetName2)].Text = song.DuetPart2;
Texts[TextDuetName1].Text = song.DuetPart1;
Texts[TextDuetName2].Text = song.DuetPart2;
//More than one song: Player is not assigned to line by user
//Otherwise, this is done by CScreenNames
if (CGame.GetNumSongs() > 1)
@@ -667,18 +667,18 @@ namespace Vocaluxe.Screens
for (int p = 0; p < CGame.NumPlayer; p++)
{
NoteLines[p] = SingNotes[htSingNotes(SingBars)].AddPlayer(
SingNotes[htSingNotes(SingBars)].BarPos[p, CGame.NumPlayer - 1],
NoteLines[p] = SingNotes[SingBars].AddPlayer(
SingNotes[SingBars].BarPos[p, CGame.NumPlayer - 1],
CTheme.GetPlayerColor(p + 1),
p);
}
/*
case 4:
NoteLines[0] = SingNotes[htSingNotes(SingBars)].AddPlayer(new SRectF(35f, 100f, 590f, 200f, -0.5f), CTheme.ThemeColors.Player[0]);
NoteLines[1] = SingNotes[htSingNotes(SingBars)].AddPlayer(new SRectF(35f, 350f, 590f, 200f, -0.5f), CTheme.ThemeColors.Player[1]);
NoteLines[2] = SingNotes[htSingNotes(SingBars)].AddPlayer(new SRectF(640f, 100f, 590f, 200f, -0.5f), CTheme.ThemeColors.Player[2]);
NoteLines[3] = SingNotes[htSingNotes(SingBars)].AddPlayer(new SRectF(640f, 350f, 590f, 200f, -0.5f), CTheme.ThemeColors.Player[3]);
NoteLines[0] = SingNotes[SingBars].AddPlayer(new SRectF(35f, 100f, 590f, 200f, -0.5f), CTheme.ThemeColors.Player[0]);
NoteLines[1] = SingNotes[SingBars].AddPlayer(new SRectF(35f, 350f, 590f, 200f, -0.5f), CTheme.ThemeColors.Player[1]);
NoteLines[2] = SingNotes[SingBars].AddPlayer(new SRectF(640f, 100f, 590f, 200f, -0.5f), CTheme.ThemeColors.Player[2]);
NoteLines[3] = SingNotes[SingBars].AddPlayer(new SRectF(640f, 350f, 590f, 200f, -0.5f), CTheme.ThemeColors.Player[3]);
break;
*/
@@ -700,22 +700,22 @@ namespace Vocaluxe.Screens
private void SetDuetLyricsVisibility(bool isDuet)
{
Statics[htStatics(StaticLyricsDuet)].Visible = isDuet;
Lyrics[htLyrics(LyricMainDuet)].Visible = isDuet;
Lyrics[htLyrics(LyricSubDuet)].Visible = isDuet;
Statics[StaticLyricsDuet].Visible = isDuet;
Lyrics[LyricMainDuet].Visible = isDuet;
Lyrics[LyricSubDuet].Visible = isDuet;
if (isDuet)
{
Lyrics[htLyrics(LyricMainTop)].Visible = false;
Lyrics[htLyrics(LyricSubTop)].Visible = false;
Statics[htStatics(StaticLyricsTop)].Visible = false;
Lyrics[LyricMainTop].Visible = false;
Lyrics[LyricSubTop].Visible = false;
Statics[StaticLyricsTop].Visible = false;
}
else
{
bool LyricsOnTop = (CGame.NumPlayer != 1) && CConfig.LyricsOnTop == EOffOn.TR_CONFIG_ON;
Lyrics[htLyrics(LyricMainTop)].Visible = LyricsOnTop;
Lyrics[htLyrics(LyricSubTop)].Visible = LyricsOnTop;
Statics[htStatics(StaticLyricsTop)].Visible = LyricsOnTop;
Lyrics[LyricMainTop].Visible = LyricsOnTop;
Lyrics[LyricSubTop].Visible = LyricsOnTop;
Statics[StaticLyricsTop].Visible = LyricsOnTop;
}
}
@@ -796,54 +796,54 @@ namespace Vocaluxe.Screens
for (int j = 0; j < CGame.NumPlayer; j++)
{
if (CGame.Player[j].LineNr == i)
SingNotes[htSingNotes(SingBars)].AddLine(NoteLines[j], line, nr, j);
SingNotes[SingBars].AddLine(NoteLines[j], line, nr, j);
}
if (i == 0 && !song.IsDuet || i == 1 && song.IsDuet)
{
Lyrics[htLyrics(LyricMain)].SetLine(line[nr]);
Lyrics[htLyrics(LyricMainTop)].SetLine(line[nr]);
Lyrics[LyricMain].SetLine(line[nr]);
Lyrics[LyricMainTop].SetLine(line[nr]);
_TimeToFirstNote = CGame.GetTimeFromBeats(line[nr].FirstNoteBeat - line[nr].StartBeat, song.BPM);
_RemainingTimeToFirstNote = CGame.GetTimeFromBeats(line[nr].FirstNoteBeat - CGame.GetBeatFromTime(_CurrentTime, song.BPM, song.Gap), song.BPM);
if (line.Length >= nr + 2)
{
Lyrics[htLyrics(LyricSub)].SetLine(line[nr + 1]);
Lyrics[htLyrics(LyricSubTop)].SetLine(line[nr + 1]);
Lyrics[LyricSub].SetLine(line[nr + 1]);
Lyrics[LyricSubTop].SetLine(line[nr + 1]);
}
else
{
Lyrics[htLyrics(LyricSub)].Clear();
Lyrics[htLyrics(LyricSubTop)].Clear();
Lyrics[LyricSub].Clear();
Lyrics[LyricSubTop].Clear();
}
}
if (i == 0 && song.IsDuet)
{
Lyrics[htLyrics(LyricMainDuet)].SetLine(line[nr]);
Lyrics[LyricMainDuet].SetLine(line[nr]);
_TimeToFirstNoteDuet = CGame.GetTimeFromBeats(line[nr].FirstNoteBeat - line[nr].StartBeat, song.BPM);
_RemainingTimeToFirstNoteDuet = CGame.GetTimeFromBeats(line[nr].FirstNoteBeat - CGame.GetBeatFromTime(_CurrentTime, song.BPM, song.Gap), song.BPM);
if (line.Length >= nr + 2)
Lyrics[htLyrics(LyricSubDuet)].SetLine(line[nr + 1]);
Lyrics[LyricSubDuet].SetLine(line[nr + 1]);
else
Lyrics[htLyrics(LyricSubDuet)].Clear();
Lyrics[LyricSubDuet].Clear();
}
}
else
{
if (i == 0 && !song.IsDuet || i == 1 && song.IsDuet)
{
Lyrics[htLyrics(LyricMain)].Clear();
Lyrics[htLyrics(LyricSub)].Clear();
Lyrics[htLyrics(LyricMainTop)].Clear();
Lyrics[htLyrics(LyricSubTop)].Clear();
Lyrics[LyricMain].Clear();
Lyrics[LyricSub].Clear();
Lyrics[LyricMainTop].Clear();
Lyrics[LyricSubTop].Clear();
_TimeToFirstNote = 0f;
}
if (i == 0 && song.IsDuet)
{
Lyrics[htLyrics(LyricMainDuet)].Clear();
Lyrics[htLyrics(LyricSubDuet)].Clear();
Lyrics[LyricMainDuet].Clear();
Lyrics[LyricSubDuet].Clear();
_TimeToFirstNoteDuet = 0f;
}
}
@@ -855,18 +855,18 @@ namespace Vocaluxe.Screens
_Pause = !_Pause;
if (_Pause)
{
Buttons[htButtons(ButtonCancel)].Visible = true;
Buttons[htButtons(ButtonContinue)].Visible = true;
Buttons[ButtonCancel].Visible = true;
Buttons[ButtonContinue].Visible = true;
if (CGame.NumRounds > CGame.RoundNr && CGame.NumRounds > 1)
Buttons[htButtons(ButtonSkip)].Visible = true;
Buttons[ButtonSkip].Visible = true;
else
Buttons[htButtons(ButtonSkip)].Visible = false;
Buttons[ButtonSkip].Visible = false;
CSound.Pause(_CurrentStream);
}else
{
Buttons[htButtons(ButtonCancel)].Visible = false;
Buttons[htButtons(ButtonContinue)].Visible = false;
Buttons[htButtons(ButtonSkip)].Visible = false;
Buttons[ButtonCancel].Visible = false;
Buttons[ButtonContinue].Visible = false;
Buttons[ButtonSkip].Visible = false;
CSound.Play(_CurrentStream);
CWebcam.Start();
}
@@ -918,17 +918,17 @@ namespace Vocaluxe.Screens
private void SetVisibility()
{
Statics[htStatics(StaticLyricsDuet)].Visible = false;
Statics[htStatics(StaticLyricHelper)].Visible = false;
Statics[htStatics(StaticLyricHelperDuet)].Visible = false;
Statics[htStatics(StaticLyricHelperTop)].Visible = false;
Lyrics[htLyrics(LyricMainDuet)].Visible = false;
Lyrics[htLyrics(LyricSubDuet)].Visible = false;
Statics[StaticLyricsDuet].Visible = false;
Statics[StaticLyricHelper].Visible = false;
Statics[StaticLyricHelperDuet].Visible = false;
Statics[StaticLyricHelperTop].Visible = false;
Lyrics[LyricMainDuet].Visible = false;
Lyrics[LyricSubDuet].Visible = false;
Statics[htStatics(StaticSongText)].Visible = false;
Texts[htTexts(TextSongName)].Visible = false;
Texts[htTexts(TextDuetName1)].Visible = false;
Texts[htTexts(TextDuetName2)].Visible = false;
Statics[StaticSongText].Visible = false;
Texts[TextSongName].Visible = false;
Texts[TextDuetName1].Visible = false;
Texts[TextDuetName2].Visible = false;
for (int numplayer = 0; numplayer < CSettings.MaxNumPlayer; numplayer++)
{
@@ -936,33 +936,33 @@ namespace Vocaluxe.Screens
{
if (player <= numplayer)
{
Texts[htTexts(TextScores[player, numplayer])].Visible = (numplayer + 1 == CGame.NumPlayer);
Texts[htTexts(TextNames[player, numplayer])].Visible = ((numplayer + 1 == CGame.NumPlayer)
Texts[TextScores[player, numplayer]].Visible = (numplayer + 1 == CGame.NumPlayer);
Texts[TextNames[player, numplayer]].Visible = ((numplayer + 1 == CGame.NumPlayer)
&& (CConfig.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_BOTH || CConfig.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_NAME));
Statics[htStatics(StaticScores[player, numplayer])].Visible = (numplayer + 1 == CGame.NumPlayer);
Statics[htStatics(StaticAvatars[player, numplayer])].Visible = ((numplayer + 1 == CGame.NumPlayer)
Statics[StaticScores[player, numplayer]].Visible = (numplayer + 1 == CGame.NumPlayer);
Statics[StaticAvatars[player, numplayer]].Visible = ((numplayer + 1 == CGame.NumPlayer)
&& (CConfig.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_BOTH || CConfig.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_AVATAR));
}
}
}
Lyrics[htLyrics(LyricMain)].Alpha = 0f;
Lyrics[htLyrics(LyricSub)].Alpha = 0f;
Lyrics[LyricMain].Alpha = 0f;
Lyrics[LyricSub].Alpha = 0f;
Lyrics[htLyrics(LyricMainTop)].Alpha = 0f;
Lyrics[htLyrics(LyricSubTop)].Alpha = 0f;
Lyrics[LyricMainTop].Alpha = 0f;
Lyrics[LyricSubTop].Alpha = 0f;
Statics[htStatics(StaticLyrics)].Alpha = 0f;
Statics[htStatics(StaticLyricsTop)].Alpha = 0f;
Statics[StaticLyrics].Alpha = 0f;
Statics[StaticLyricsTop].Alpha = 0f;
Statics[htStatics(StaticLyricHelper)].Alpha = 0f;
Statics[htStatics(StaticLyricHelperTop)].Alpha = 0f;
Statics[StaticLyricHelper].Alpha = 0f;
Statics[StaticLyricHelperTop].Alpha = 0f;
Lyrics[htLyrics(LyricMainDuet)].Alpha = 0f;
Lyrics[htLyrics(LyricSubDuet)].Alpha = 0f;
Lyrics[LyricMainDuet].Alpha = 0f;
Lyrics[LyricSubDuet].Alpha = 0f;
Statics[htStatics(StaticLyricsDuet)].Alpha = 0f;
Statics[htStatics(StaticLyricHelperDuet)].Alpha = 0f;
Statics[StaticLyricsDuet].Alpha = 0f;
Statics[StaticLyricHelperDuet].Alpha = 0f;
}
@@ -992,28 +992,28 @@ namespace Vocaluxe.Screens
if (time > totaltime)
time = totaltime;
SRectF Rect = Statics[htStatics(StaticLyricHelper)].Rect;
SRectF Rect = Statics[StaticLyricHelper].Rect;
SColorF Color = new SColorF(
Statics[htStatics(StaticLyricHelper)].Color.R,
Statics[htStatics(StaticLyricHelper)].Color.G,
Statics[htStatics(StaticLyricHelper)].Color.B,
Statics[htStatics(StaticLyricHelper)].Color.A * Statics[htStatics(StaticLyricHelper)].Alpha * alpha);
Statics[StaticLyricHelper].Color.R,
Statics[StaticLyricHelper].Color.G,
Statics[StaticLyricHelper].Color.B,
Statics[StaticLyricHelper].Color.A * Statics[StaticLyricHelper].Alpha * alpha);
float distance = Lyrics[htLyrics(LyricMain)].GetCurrentLyricPosX() - Rect.X - Rect.W;
CDraw.DrawTexture(Statics[htStatics(StaticLyricHelper)].Texture,
float distance = Lyrics[LyricMain].GetCurrentLyricPosX() - Rect.X - Rect.W;
CDraw.DrawTexture(Statics[StaticLyricHelper].Texture,
new SRectF(Rect.X + distance * (1f - time / totaltime), Rect.Y, Rect.W, Rect.H, Rect.Z), Color);
if (Statics[htStatics(StaticLyricsTop)].Visible)
if (Statics[StaticLyricsTop].Visible)
{
Rect = Statics[htStatics(StaticLyricHelperTop)].Rect;
Rect = Statics[StaticLyricHelperTop].Rect;
Color = new SColorF(
Statics[htStatics(StaticLyricHelperTop)].Color.R,
Statics[htStatics(StaticLyricHelperTop)].Color.G,
Statics[htStatics(StaticLyricHelperTop)].Color.B,
Statics[htStatics(StaticLyricHelperTop)].Color.A * Statics[htStatics(StaticLyricHelper)].Alpha * alpha);
Statics[StaticLyricHelperTop].Color.R,
Statics[StaticLyricHelperTop].Color.G,
Statics[StaticLyricHelperTop].Color.B,
Statics[StaticLyricHelperTop].Color.A * Statics[StaticLyricHelper].Alpha * alpha);
distance = Lyrics[htLyrics(LyricMainTop)].GetCurrentLyricPosX() - Rect.X - Rect.W;
CDraw.DrawTexture(Statics[htStatics(StaticLyricHelperTop)].Texture,
distance = Lyrics[LyricMainTop].GetCurrentLyricPosX() - Rect.X - Rect.W;
CDraw.DrawTexture(Statics[StaticLyricHelperTop].Texture,
new SRectF(Rect.X + distance * (1f - time / totaltime), Rect.Y, Rect.W, Rect.H, Rect.Z), Color);
}
}
@@ -1031,16 +1031,16 @@ namespace Vocaluxe.Screens
if (time > totaltime)
time = totaltime;
SRectF Rect = Statics[htStatics(StaticLyricHelperDuet)].Rect;
SRectF Rect = Statics[StaticLyricHelperDuet].Rect;
SColorF Color = new SColorF(
Statics[htStatics(StaticLyricHelperDuet)].Color.R,
Statics[htStatics(StaticLyricHelperDuet)].Color.G,
Statics[htStatics(StaticLyricHelperDuet)].Color.B,
Statics[htStatics(StaticLyricHelperDuet)].Color.A * Statics[htStatics(StaticLyricHelperDuet)].Alpha * alpha);
Statics[StaticLyricHelperDuet].Color.R,
Statics[StaticLyricHelperDuet].Color.G,
Statics[StaticLyricHelperDuet].Color.B,
Statics[StaticLyricHelperDuet].Color.A * Statics[StaticLyricHelperDuet].Alpha * alpha);
float distance = Lyrics[htLyrics(LyricMainDuet)].GetCurrentLyricPosX() - Rect.X - Rect.W;
CDraw.DrawTexture(Statics[htStatics(StaticLyricHelperDuet)].Texture,
float distance = Lyrics[LyricMainDuet].GetCurrentLyricPosX() - Rect.X - Rect.W;
CDraw.DrawTexture(Statics[StaticLyricHelperDuet].Texture,
new SRectF(Rect.X + distance * (1f - time / totaltime), Rect.Y, Rect.W, Rect.H, Rect.Z),
Color);
}
@@ -1157,36 +1157,36 @@ namespace Vocaluxe.Screens
private void UpdateSongText()
{
if (_TimerSongText.IsRunning && !Lyrics[htLyrics(LyricMainDuet)].Visible && !Lyrics[htLyrics(LyricMainTop)].Visible)
if (_TimerSongText.IsRunning && !Lyrics[LyricMainDuet].Visible && !Lyrics[LyricMainTop].Visible)
{
float t = _TimerSongText.ElapsedMilliseconds / 1000f;
if (t < 10f)
{
Statics[htStatics(StaticSongText)].Visible = true;
Texts[htTexts(TextSongName)].Visible = true;
Statics[StaticSongText].Visible = true;
Texts[TextSongName].Visible = true;
if (t < 7f)
{
Statics[htStatics(StaticSongText)].Color.A = 1f;
Texts[htTexts(TextSongName)].Color.A = 1f;
Statics[StaticSongText].Color.A = 1f;
Texts[TextSongName].Color.A = 1f;
}
else
{
Statics[htStatics(StaticSongText)].Color.A = (3f - (t - 7f)) / 3f;
Texts[htTexts(TextSongName)].Color.A = (3f - (t - 7f)) / 3f;
Statics[StaticSongText].Color.A = (3f - (t - 7f)) / 3f;
Texts[TextSongName].Color.A = (3f - (t - 7f)) / 3f;
}
}
else
{
Statics[htStatics(StaticSongText)].Visible = false;
Texts[htTexts(TextSongName)].Visible = false;
Statics[StaticSongText].Visible = false;
Texts[TextSongName].Visible = false;
_TimerSongText.Stop();
}
}
else
{
Statics[htStatics(StaticSongText)].Visible = false;
Texts[htTexts(TextSongName)].Visible = false;
Statics[StaticSongText].Visible = false;
Texts[TextSongName].Visible = false;
}
}
@@ -1200,32 +1200,32 @@ namespace Vocaluxe.Screens
float t = _TimerDuetText1.ElapsedMilliseconds / 1000f;
if (t < 10f)
{
Texts[htTexts(TextDuetName1)].Visible = true;
Texts[TextDuetName1].Visible = true;
if (t < 3f)
{
Texts[htTexts(TextDuetName1)].Color.A = (3f - (3f - t)) / 3f;
Texts[TextDuetName1].Color.A = (3f - (3f - t)) / 3f;
}
else if (t < 7f)
{
Texts[htTexts(TextDuetName1)].Color.A = 1f;
Texts[TextDuetName1].Color.A = 1f;
}
else
{
Texts[htTexts(TextDuetName1)].Color.A = (3f - (t - 7f)) / 3f;
Texts[TextDuetName1].Color.A = (3f - (t - 7f)) / 3f;
}
}
else
{
Texts[htTexts(TextDuetName1)].Visible = false;
Texts[TextDuetName1].Visible = false;
_TimerDuetText1.Stop();
}
}
else if (!_TimerDuetText1.IsRunning && _TimerDuetText1.ElapsedMilliseconds == 0 && Lyrics[htLyrics(LyricMainDuet)].Alpha > 0 && CGame.GetSong().IsDuet)
else if (!_TimerDuetText1.IsRunning && _TimerDuetText1.ElapsedMilliseconds == 0 && Lyrics[LyricMainDuet].Alpha > 0 && CGame.GetSong().IsDuet)
_TimerDuetText1.Start();
else
{
Texts[htTexts(TextDuetName1)].Visible = false;
Texts[TextDuetName1].Visible = false;
}
//Timer for second duet-part
if (_TimerDuetText2.IsRunning)
@@ -1233,32 +1233,32 @@ namespace Vocaluxe.Screens
float t = _TimerDuetText2.ElapsedMilliseconds / 1000f;
if (t < 10f)
{
Texts[htTexts(TextDuetName2)].Visible = true;
Texts[TextDuetName2].Visible = true;
if (t < 3f)
{
Texts[htTexts(TextDuetName2)].Color.A = (3f - (3f - t)) / 3f;
Texts[TextDuetName2].Color.A = (3f - (3f - t)) / 3f;
}
else if (t < 7f)
{
Texts[htTexts(TextDuetName2)].Color.A = 1f;
Texts[TextDuetName2].Color.A = 1f;
}
else
{
Texts[htTexts(TextDuetName2)].Color.A = (3f - (t - 7f)) / 3f;
Texts[TextDuetName2].Color.A = (3f - (t - 7f)) / 3f;
}
}
else
{
Texts[htTexts(TextDuetName2)].Visible = false;
Texts[TextDuetName2].Visible = false;
_TimerDuetText2.Stop();
}
}
else if (!_TimerDuetText2.IsRunning && _TimerDuetText2.ElapsedMilliseconds == 0 && Lyrics[htLyrics(LyricMain)].Alpha > 0 && CGame.GetSong().IsDuet)
else if (!_TimerDuetText2.IsRunning && _TimerDuetText2.ElapsedMilliseconds == 0 && Lyrics[LyricMain].Alpha > 0 && CGame.GetSong().IsDuet)
_TimerDuetText2.Start();
else
{
Texts[htTexts(TextDuetName2)].Visible = false;
Texts[TextDuetName2].Visible = false;
}
}
}
@@ -1286,19 +1286,19 @@ namespace Vocaluxe.Screens
case ETimerMode.TR_CONFIG_TIMERMODE_CURRENT:
int min = (int)Math.Floor(CurrentTime / 60f);
int sec = (int)(CurrentTime - min * 60f);
Texts[htTexts(TextTime)].Text = min.ToString("00") + ":" + sec.ToString("00");
Texts[TextTime].Text = min.ToString("00") + ":" + sec.ToString("00");
break;
case ETimerMode.TR_CONFIG_TIMERMODE_REMAINING:
min = (int)Math.Floor(RemainingTime / 60f);
sec = (int)(RemainingTime - min * 60f);
Texts[htTexts(TextTime)].Text = "-" + min.ToString("00") + ":" + sec.ToString("00");
Texts[TextTime].Text = "-" + min.ToString("00") + ":" + sec.ToString("00");
break;
case ETimerMode.TR_CONFIG_TIMERMODE_TOTAL:
min = (int)Math.Floor(TotalTime / 60f);
sec = (int)(TotalTime - min * 60f);
Texts[htTexts(TextTime)].Text = "#" + min.ToString("00") + ":" + sec.ToString("00");
Texts[TextTime].Text = "#" + min.ToString("00") + ":" + sec.ToString("00");
break;
}
@@ -1306,44 +1306,44 @@ namespace Vocaluxe.Screens
switch (CConfig.TimerLook)
{
case ETimerLook.TR_CONFIG_TIMERLOOK_NORMAL:
_TimeLineRect.W = Statics[htStatics(StaticTimeLine)].Rect.W * (CurrentTime / TotalTime);
_TimeLineRect.W = Statics[StaticTimeLine].Rect.W * (CurrentTime / TotalTime);
break;
case ETimerLook.TR_CONFIG_TIMERLOOK_EXPANDED:
CStatic stat = Statics[htStatics(StaticTimeLine)];
CStatic stat = Statics[StaticTimeLine];
int CurrentBeat = CGame.CurrentBeat;
for (int i = 0; i < _TimeRects.Count; i++)
{
if (CurrentBeat >= _TimeRects[i].startBeat && CurrentBeat <= _TimeRects[i].endBeat)
{
_TimeRects[i].rect.Texture = Statics[htStatics(StaticTimeLineExpandedHighlighted)].Texture;
_TimeRects[i].rect.Color = Statics[htStatics(StaticTimeLineExpandedHighlighted)].Color;
_TimeRects[i].rect.Texture = Statics[StaticTimeLineExpandedHighlighted].Texture;
_TimeRects[i].rect.Color = Statics[StaticTimeLineExpandedHighlighted].Color;
}
else
{
_TimeRects[i].rect.Texture = Statics[htStatics(StaticTimeLineExpandedNormal)].Texture;
_TimeRects[i].rect.Color = Statics[htStatics(StaticTimeLineExpandedNormal)].Color;
_TimeRects[i].rect.Texture = Statics[StaticTimeLineExpandedNormal].Texture;
_TimeRects[i].rect.Color = Statics[StaticTimeLineExpandedNormal].Color;
}
}
Statics[htStatics(StaticTimePointer)].Rect.X = stat.Rect.X + stat.Rect.W * (CurrentTime / TotalTime);
Statics[StaticTimePointer].Rect.X = stat.Rect.X + stat.Rect.W * (CurrentTime / TotalTime);
break;
}
}
private void PrepareTimeLine()
{
CStatic stat = Statics[htStatics(StaticTimeLine)];
CStatic stat = Statics[StaticTimeLine];
switch (CConfig.TimerLook)
{
case ETimerLook.TR_CONFIG_TIMERLOOK_NORMAL:
_TimeLineRect = new SRectF(stat.Rect.X, stat.Rect.Y, 0f, stat.Rect.H, stat.Rect.Z);
Statics[htStatics(StaticTimePointer)].Visible = false;
Statics[StaticTimePointer].Visible = false;
break;
case ETimerLook.TR_CONFIG_TIMERLOOK_EXPANDED:
_TimeRects.Clear();
Statics[htStatics(StaticTimePointer)].Visible = true;
Statics[StaticTimePointer].Visible = true;
CSong song = CGame.GetSong();
@@ -1394,11 +1394,11 @@ namespace Vocaluxe.Screens
{
if (CGame.Player[i].ProfileID > -1)
{
Statics[htStatics(StaticAvatars[i, CGame.NumPlayer - 1])].Texture = CProfiles.Profiles[CGame.Player[i].ProfileID].Avatar.Texture;
Statics[StaticAvatars[i, CGame.NumPlayer - 1]].Texture = CProfiles.Profiles[CGame.Player[i].ProfileID].Avatar.Texture;
}
else
{
Statics[htStatics(StaticAvatars[i, CGame.NumPlayer - 1])].Visible = false;
Statics[StaticAvatars[i, CGame.NumPlayer - 1]].Visible = false;
}
}
}
@@ -1409,11 +1409,11 @@ namespace Vocaluxe.Screens
{
if (CGame.Player[i].ProfileID > -1)
{
Texts[htTexts(TextNames[i, CGame.NumPlayer - 1])].Text = CProfiles.Profiles[CGame.Player[i].ProfileID].PlayerName;
Texts[TextNames[i, CGame.NumPlayer - 1]].Text = CProfiles.Profiles[CGame.Player[i].ProfileID].PlayerName;
}
else
{
Texts[htTexts(TextNames[i, CGame.NumPlayer - 1])].Visible = false;
Texts[TextNames[i, CGame.NumPlayer - 1]].Visible = false;
}
}
}
+214 -214
View File
@@ -131,11 +131,11 @@ namespace Vocaluxe.Screens
{
base.LoadTheme(XmlPath);
ToggleSongOptions(ESongOptionsView.None);
Playlists[htPlaylists(Playlist)].Visible = false;
Playlists[Playlist].Visible = false;
DragAndDropCover = GetNewStatic();
Playlists[htPlaylists(Playlist)].Init();
Playlists[Playlist].Init();
_AvailableGameModes.Clear();
@@ -150,7 +150,7 @@ namespace Vocaluxe.Screens
if (_PlaylistActive)
{
Playlists[htPlaylists(Playlist)].HandleInput(KeyEvent);
Playlists[Playlist].HandleInput(KeyEvent);
return true;
}
@@ -168,7 +168,7 @@ namespace Vocaluxe.Screens
}
else
{
SongMenus[htSongMenus(SongMenu)].HandleInput(ref KeyEvent, _sso);
SongMenus[SongMenu].HandleInput(ref KeyEvent, _sso);
UpdatePartyModeOptions();
if (KeyEvent.Handled)
@@ -194,21 +194,21 @@ namespace Vocaluxe.Screens
{
if (i < _sso.Selection.NumJokers.Length)
{
if (Buttons[htButtons(ButtonsJoker[i])].Selected)
if (Buttons[ButtonsJoker[i]].Selected)
{
SelectNextRandom(i);
return true;
}
}
}
if (Buttons[htButtons(ButtonStart)].Selected)
if (Buttons[ButtonStart].Selected)
{
HandlePartySongSelection(SongMenus[htSongMenus(SongMenu)].GetSelectedSong());
HandlePartySongSelection(SongMenus[SongMenu].GetSelectedSong());
}
}
if (CSongs.NumVisibleSongs > 0 && !_sso.Selection.PartyMode)
{
if (SongMenus[htSongMenus(SongMenu)].GetSelectedSong() != -1 && !_SongOptionsActive)
if (SongMenus[SongMenu].GetSelectedSong() != -1 && !_SongOptionsActive)
{
if (!_sso.Selection.PartyMode)
ToggleSongOptions(ESongOptionsView.Song);
@@ -217,11 +217,11 @@ namespace Vocaluxe.Screens
break;
case Keys.Tab:
if (Playlists[htPlaylists(Playlist)].Visible)
if (Playlists[Playlist].Visible)
{
_PlaylistActive = !_PlaylistActive;
Playlists[htPlaylists(Playlist)].Selected = _PlaylistActive;
SongMenus[htSongMenus(SongMenu)].SetActive(!_PlaylistActive);
Playlists[Playlist].Selected = _PlaylistActive;
SongMenus[SongMenu].SetActive(!_PlaylistActive);
}
break;
@@ -273,7 +273,7 @@ namespace Vocaluxe.Screens
case Keys.S:
if (KeyEvent.Mod == EModifier.Ctrl && CSongs.NumVisibleSongs > 0 && !_sso.Selection.PartyMode)
StartMedleySong(SongMenus[htSongMenus(SongMenu)].GetSelectedSong());
StartMedleySong(SongMenus[SongMenu].GetSelectedSong());
break;
case Keys.D1:
@@ -308,51 +308,51 @@ namespace Vocaluxe.Screens
switch (KeyEvent.Key)
{
case Keys.Enter:
if (Buttons[htButtons(ButtonOptionsClose)].Selected)
if (Buttons[ButtonOptionsClose].Selected)
{
ToggleSongOptions(ESongOptionsView.None);
}
else if (Buttons[htButtons(ButtonOptionsSing)].Selected)
else if (Buttons[ButtonOptionsSing].Selected)
{
ToggleSongOptions(ESongOptionsView.None);
StartSong(SongMenus[htSongMenus(SongMenu)].GetSelectedSong());
StartSong(SongMenus[SongMenu].GetSelectedSong());
}
else if (Buttons[htButtons(ButtonOptionsPlaylist)].Selected)
else if (Buttons[ButtonOptionsPlaylist].Selected)
{
ToggleSongOptions(ESongOptionsView.None);
OpenAndAddPlaylistAction();
}
else if (Buttons[htButtons(ButtonOptionsRandom)].Selected)
else if (Buttons[ButtonOptionsRandom].Selected)
{
if (CSongs.IsInCategory)
SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong());
SongMenus[SongMenu].SetSelectedSong(CSongs.GetRandomSong());
else
SongMenus[htSongMenus(SongMenu)].SetSelectedCategory(CSongs.GetRandomCategory());
SongMenus[SongMenu].SetSelectedCategory(CSongs.GetRandomCategory());
}
else if (Buttons[htButtons(ButtonOptionsSingAll)].Selected)
else if (Buttons[ButtonOptionsSingAll].Selected)
{
StartRandomAllSongs();
}
else if (Buttons[htButtons(ButtonOptionsSingAllVisible)].Selected)
else if (Buttons[ButtonOptionsSingAllVisible].Selected)
{
StartRandomVisibleSongs();
}
else if (Buttons[htButtons(ButtonOptionsOpenSelectedItem)].Selected)
else if (Buttons[ButtonOptionsOpenSelectedItem].Selected)
{
_HandleSelectButton();
}
else if (SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].Selected)
else if (SelectSlides[SelectSlideOptionsPlaylistOpen].Selected)
{
OpenPlaylistAction();
}
else if (Buttons[htButtons(ButtonOptionsRandomMedley)].Selected)
else if (Buttons[ButtonOptionsRandomMedley].Selected)
{
ToggleSongOptions(ESongOptionsView.Medley);
}
else if (Buttons[htButtons(ButtonOptionsStartMedley)].Selected)
else if (Buttons[ButtonOptionsStartMedley].Selected)
{
ToggleSongOptions(ESongOptionsView.None);
StartRandomMedley(SelectSlides[htSelectSlides(SelectSlideOptionsNumMedleySongs)].Selection + 1, !CSongs.IsInCategory);
StartRandomMedley(SelectSlides[SelectSlideOptionsNumMedleySongs].Selection + 1, !CSongs.IsInCategory);
}
break;
@@ -396,24 +396,24 @@ namespace Vocaluxe.Screens
OldMousePosX = MouseEvent.X;
OldMousePosY = MouseEvent.Y;
if (Playlists[htPlaylists(Playlist)].Visible && Playlists[htPlaylists(Playlist)].IsMouseOver(MouseEvent))
if (Playlists[Playlist].Visible && Playlists[Playlist].IsMouseOver(MouseEvent))
{
_PlaylistActive = true;
Playlists[htPlaylists(Playlist)].Selected = _PlaylistActive;
SongMenus[htSongMenus(SongMenu)].SetActive(!_PlaylistActive);
Playlists[Playlist].Selected = _PlaylistActive;
SongMenus[SongMenu].SetActive(!_PlaylistActive);
ToggleSongOptions(ESongOptionsView.None);
}
else if (CHelper.IsInBounds(SongMenus[htSongMenus(SongMenu)].Rect, MouseEvent.X, MouseEvent.Y))
else if (CHelper.IsInBounds(SongMenus[SongMenu].Rect, MouseEvent.X, MouseEvent.Y))
{
_PlaylistActive = false;
Playlists[htPlaylists(Playlist)].Selected = _PlaylistActive;
SongMenus[htSongMenus(SongMenu)].SetActive(!_PlaylistActive);
Playlists[Playlist].Selected = _PlaylistActive;
SongMenus[SongMenu].SetActive(!_PlaylistActive);
}
if (Playlists[htPlaylists(Playlist)].Visible && _PlaylistActive)
if (Playlists[Playlist].Visible && _PlaylistActive)
{
if (Playlists[htPlaylists(Playlist)].HandleMouse(MouseEvent))
if (Playlists[Playlist].HandleMouse(MouseEvent))
{
return true;
}
@@ -452,15 +452,15 @@ namespace Vocaluxe.Screens
{
//TODO: Causes Bug if you select a song (e.g. with Select random song) and double click a normal button.
//E.g. clicking to fast on Select random song starts the next random song. is this OK?
if (CSongs.NumVisibleSongs > 0 && SongMenus[htSongMenus(SongMenu)].GetActualSelection() != -1)
if (CSongs.NumVisibleSongs > 0 && SongMenus[SongMenu].GetActualSelection() != -1)
{
ToggleSongOptions(ESongOptionsView.None);
StartVisibleSong(SongMenus[htSongMenus(SongMenu)].GetActualSelection());
StartVisibleSong(SongMenus[SongMenu].GetActualSelection());
return true;
}
}
SongMenus[htSongMenus(SongMenu)].HandleMouse(ref MouseEvent, _sso);
SongMenus[SongMenu].HandleMouse(ref MouseEvent, _sso);
UpdatePartyModeOptions();
if (MouseEvent.Handled)
@@ -470,80 +470,80 @@ namespace Vocaluxe.Screens
{
if (IsMouseOver(MouseEvent))
{
if (Buttons[htButtons(ButtonOpenOptions)].Selected)
if (Buttons[ButtonOpenOptions].Selected)
{
ToggleSongOptions(ESongOptionsView.General);
return true;
} else if (Buttons[htButtons(ButtonOptionsClose)].Selected)
} else if (Buttons[ButtonOptionsClose].Selected)
{
ToggleSongOptions(ESongOptionsView.None);
return true;
} else if (Buttons[htButtons(ButtonOptionsSing)].Selected)
} else if (Buttons[ButtonOptionsSing].Selected)
{
ToggleSongOptions(ESongOptionsView.None);
StartSong(SongMenus[htSongMenus(SongMenu)].GetSelectedSong());
StartSong(SongMenus[SongMenu].GetSelectedSong());
return true;
}
else if (Buttons[htButtons(ButtonOptionsPlaylist)].Selected)
else if (Buttons[ButtonOptionsPlaylist].Selected)
{
ToggleSongOptions(ESongOptionsView.None);
OpenAndAddPlaylistAction();
return true;
}
else if (Buttons[htButtons(ButtonOptionsRandom)].Selected)
else if (Buttons[ButtonOptionsRandom].Selected)
{
if (CSongs.IsInCategory)
{
SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong());
SongMenus[SongMenu].SetSelectedSong(CSongs.GetRandomSong());
return true;
}
}
else if (Buttons[htButtons(ButtonOptionsRandomCategory)].Selected)
else if (Buttons[ButtonOptionsRandomCategory].Selected)
{
if (!CSongs.IsInCategory)
{
SongMenus[htSongMenus(SongMenu)].SetSelectedCategory(CSongs.GetRandomCategory());
SongMenus[SongMenu].SetSelectedCategory(CSongs.GetRandomCategory());
return true;
}
}
else if (Buttons[htButtons(ButtonOptionsSingAll)].Selected)
else if (Buttons[ButtonOptionsSingAll].Selected)
{
ToggleSongOptions(ESongOptionsView.None);
StartRandomAllSongs();
return true;
}
else if (Buttons[htButtons(ButtonOptionsSingAllVisible)].Selected)
else if (Buttons[ButtonOptionsSingAllVisible].Selected)
{
ToggleSongOptions(ESongOptionsView.None);
StartRandomVisibleSongs();
return true;
}
else if (Buttons[htButtons(ButtonOptionsOpenSelectedItem)].Selected)
else if (Buttons[ButtonOptionsOpenSelectedItem].Selected)
{
_HandleSelectButton();
return true;
}
else if (SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].ValueSelected)
else if (SelectSlides[SelectSlideOptionsPlaylistOpen].ValueSelected)
{
OpenPlaylistAction();
return true;
}
else if (Buttons[htButtons(ButtonOptionsRandomMedley)].Selected)
else if (Buttons[ButtonOptionsRandomMedley].Selected)
{
ToggleSongOptions(ESongOptionsView.Medley);
return true;
}
else if (Buttons[htButtons(ButtonOptionsStartMedley)].Selected)
else if (Buttons[ButtonOptionsStartMedley].Selected)
{
ToggleSongOptions(ESongOptionsView.None);
StartRandomMedley(SelectSlides[htSelectSlides(SelectSlideOptionsNumMedleySongs)].Selection + 1, !CSongs.IsInCategory);
StartRandomMedley(SelectSlides[SelectSlideOptionsNumMedleySongs].Selection + 1, !CSongs.IsInCategory);
return true;
}
else if (_sso.Selection.RandomOnly && _sso.Selection.NumJokers != null)
{
if (Buttons[htButtons(ButtonStart)].Selected)
if (Buttons[ButtonStart].Selected)
{
HandlePartySongSelection(SongMenus[htSongMenus(SongMenu)].GetSelectedSong());
HandlePartySongSelection(SongMenus[SongMenu].GetSelectedSong());
return true;
}
@@ -551,7 +551,7 @@ namespace Vocaluxe.Screens
{
if (i < _sso.Selection.NumJokers.Length)
{
if (Buttons[htButtons(ButtonsJoker[i])].Selected)
if (Buttons[ButtonsJoker[i]].Selected)
{
SelectNextRandom(i);
return true;
@@ -561,9 +561,9 @@ namespace Vocaluxe.Screens
}
}
if (CSongs.NumVisibleSongs > 0 && SongMenus[htSongMenus(SongMenu)].GetActualSelection() != -1 && !_sso.Selection.PartyMode)
if (CSongs.NumVisibleSongs > 0 && SongMenus[SongMenu].GetActualSelection() != -1 && !_sso.Selection.PartyMode)
{
if (SongMenus[htSongMenus(SongMenu)].GetSelectedSong() != -1 && !_SongOptionsActive)
if (SongMenus[SongMenu].GetSelectedSong() != -1 && !_SongOptionsActive)
{
ToggleSongOptions(ESongOptionsView.Song);
return true;
@@ -578,11 +578,11 @@ namespace Vocaluxe.Screens
if (MouseEvent.LBH)
{
if (!DragAndDropActive && Playlists[htPlaylists(Playlist)].Visible && CSongs.NumVisibleSongs > 0 && SongMenus[htSongMenus(SongMenu)].GetActualSelection() != -1)
if (!DragAndDropActive && Playlists[Playlist].Visible && CSongs.NumVisibleSongs > 0 && SongMenus[SongMenu].GetActualSelection() != -1)
{
DragAndDropCover = SongMenus[htSongMenus(SongMenu)].GetSelectedSongCover();
DragAndDropCover = SongMenus[SongMenu].GetSelectedSongCover();
DragAndDropCover.Rect.Z = CSettings.zNear;
Playlists[htPlaylists(Playlist)].DragAndDropSongID = CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetActualSelection()].ID;
Playlists[Playlist].DragAndDropSongID = CSongs.VisibleSongs[SongMenus[SongMenu].GetActualSelection()].ID;
DragAndDropActive = true;
return true;
}
@@ -592,7 +592,7 @@ namespace Vocaluxe.Screens
if (!MouseEvent.LBH && DragAndDropActive)
{
DragAndDropActive = false;
Playlists[htPlaylists(Playlist)].DragAndDropSongID = -1;
Playlists[Playlist].DragAndDropSongID = -1;
return true;
}
@@ -608,7 +608,7 @@ namespace Vocaluxe.Screens
else if(_sso.Selection.CategoryChangeAllowed)
{
ToggleSongOptions(ESongOptionsView.None);
SongMenus[htSongMenus(SongMenu)].EnterCurrentCategory();
SongMenus[SongMenu].EnterCurrentCategory();
}
}
@@ -625,7 +625,7 @@ namespace Vocaluxe.Screens
_SearchText = _sso.Sorting.SearchString;
CGame.EnterNormalGame();
SongMenus[htSongMenus(SongMenu)].OnShow();
SongMenus[SongMenu].OnShow();
if (_sso.Selection.PartyMode)
_PlaylistActive = false;
@@ -633,56 +633,56 @@ namespace Vocaluxe.Screens
if (_sso.Selection.PartyMode)
ToggleSongOptions(ESongOptionsView.None);
SongMenus[htSongMenus(SongMenu)].SetActive(!_PlaylistActive);
SongMenus[htSongMenus(SongMenu)].SetSmallView(Playlists[htPlaylists(Playlist)].Visible);
SongMenus[SongMenu].SetActive(!_PlaylistActive);
SongMenus[SongMenu].SetSmallView(Playlists[Playlist].Visible);
if (Playlists[htPlaylists(Playlist)].ActivePlaylistID != -1)
Playlists[htPlaylists(Playlist)].LoadPlaylist(Playlists[htPlaylists(Playlist)].ActivePlaylistID);
if (Playlists[Playlist].ActivePlaylistID != -1)
Playlists[Playlist].LoadPlaylist(Playlists[Playlist].ActivePlaylistID);
DragAndDropActive = false;
Playlists[htPlaylists(Playlist)].DragAndDropSongID = -1;
Playlists[Playlist].DragAndDropSongID = -1;
UpdateGame();
}
public override bool UpdateGame()
{
if (SongMenus[htSongMenus(SongMenu)].IsSmallView())
if (SongMenus[SongMenu].IsSmallView())
CheckPlaylist();
Texts[htTexts(TextCategory)].Text = CSongs.GetCurrentCategoryName();
Texts[TextCategory].Text = CSongs.GetCurrentCategoryName();
if (CSongs.Category > -1 || CConfig.Tabs == EOffOn.TR_CONFIG_OFF)
CBackgroundMusic.Disabled = true;
else
CBackgroundMusic.Disabled = false;
int song = SongMenus[htSongMenus(SongMenu)].GetActualSelection();
int song = SongMenus[SongMenu].GetActualSelection();
if ((CSongs.Category >= 0 || CConfig.Tabs == EOffOn.TR_CONFIG_OFF) && song >= 0 && song < CSongs.VisibleSongs.Length)
{
Texts[htTexts(TextSelection)].Text = CSongs.VisibleSongs[song].Artist + " - " + CSongs.VisibleSongs[song].Title;
Texts[TextSelection].Text = CSongs.VisibleSongs[song].Artist + " - " + CSongs.VisibleSongs[song].Title;
}
else if (!CSongs.IsInCategory && song >= 0 && song < CSongs.Categories.Length)
{
Texts[htTexts(TextSelection)].Text = CSongs.Categories[song].Name;
Texts[TextSelection].Text = CSongs.Categories[song].Name;
}
else
Texts[htTexts(TextSelection)].Text = String.Empty;
Texts[TextSelection].Text = String.Empty;
Texts[htTexts(TextSearchBar)].Text = _SearchText;
Texts[TextSearchBar].Text = _SearchText;
if (_SearchActive)
{
Texts[htTexts(TextSearchBar)].Text += '|';
Texts[TextSearchBar].Text += '|';
Texts[htTexts(TextSearchBar)].Visible = true;
Texts[htTexts(TextSearchBarTitle)].Visible = true;
Statics[htStatics(StaticSearchBar)].Visible = true;
Texts[TextSearchBar].Visible = true;
Texts[TextSearchBarTitle].Visible = true;
Statics[StaticSearchBar].Visible = true;
}
else
{
Texts[htTexts(TextSearchBar)].Visible = false;
Texts[htTexts(TextSearchBarTitle)].Visible = false;
Statics[htStatics(StaticSearchBar)].Visible = false;
Texts[TextSearchBar].Visible = false;
Texts[TextSearchBarTitle].Visible = false;
Statics[StaticSearchBar].Visible = false;
}
UpdatePartyModeOptions();
@@ -704,12 +704,12 @@ namespace Vocaluxe.Screens
{
base.OnClose();
CBackgroundMusic.Disabled = false;
SongMenus[htSongMenus(SongMenu)].OnHide();
SongMenus[SongMenu].OnHide();
}
public override void ApplyVolume()
{
SongMenus[htSongMenus(SongMenu)].ApplyVolume(CConfig.PreviewMusicVolume);
SongMenus[SongMenu].ApplyVolume(CConfig.PreviewMusicVolume);
}
private void HandlePartySongSelection(int SongNr)
@@ -738,12 +738,12 @@ namespace Vocaluxe.Screens
SelectNextRandomSong();
if (_sso.Selection.SongIndex != -1)
SongMenus[htSongMenus(SongMenu)].SetSelectedSong(_sso.Selection.SongIndex);
SongMenus[SongMenu].SetSelectedSong(_sso.Selection.SongIndex);
}
if (SelectedSongID != SongMenus[htSongMenus(SongMenu)].GetSelectedSong() && CSongs.Category > -1)
if (SelectedSongID != SongMenus[SongMenu].GetSelectedSong() && CSongs.Category > -1)
{
SelectedSongID = SongMenus[htSongMenus(SongMenu)].GetSelectedSong();
SelectedSongID = SongMenus[SongMenu].GetSelectedSong();
CParty.OnSongChange(SelectedSongID, ref _sso);
}
@@ -760,55 +760,55 @@ namespace Vocaluxe.Screens
ToggleSongOptions(ESongOptionsView.None);
}
SongMenus[htSongMenus(SongMenu)].Update(_sso);
SongMenus[SongMenu].Update(_sso);
if (_sso.Selection.RandomOnly && _sso.Selection.NumJokers != null)
{
Buttons[htButtons(ButtonStart)].Visible = true;
Buttons[ButtonStart].Visible = true;
if (!SongMenus[htSongMenus(SongMenu)].IsSmallView())
SongMenus[htSongMenus(SongMenu)].SetSmallView(true);
if (!SongMenus[SongMenu].IsSmallView())
SongMenus[SongMenu].SetSmallView(true);
for (int i = 0; i < CMain.Settings.GetMaxNumPlayer(); i++)
{
if (i < _sso.Selection.NumJokers.Length)
{
Buttons[htButtons(ButtonsJoker[i])].Visible = true;
Buttons[htButtons(ButtonsJoker[i])].Text.Text = _sso.Selection.NumJokers[i].ToString();
Texts[htTexts(TextsPlayer[i])].Visible = true;
Buttons[ButtonsJoker[i]].Visible = true;
Buttons[ButtonsJoker[i]].Text.Text = _sso.Selection.NumJokers[i].ToString();
Texts[TextsPlayer[i]].Visible = true;
bool NameExists = false;
if (_sso.Selection.TeamNames != null)
{
if (_sso.Selection.TeamNames.Length > i)
{
Texts[htTexts(TextsPlayer[i])].Text = _sso.Selection.TeamNames[i];
Texts[TextsPlayer[i]].Text = _sso.Selection.TeamNames[i];
NameExists = true;
}
}
if (!NameExists)
Texts[htTexts(TextsPlayer[i])].Text = i.ToString();
Texts[TextsPlayer[i]].Text = i.ToString();
}
else
{
Buttons[htButtons(ButtonsJoker[i])].Visible = false;
Texts[htTexts(TextsPlayer[i])].Visible = false;
Buttons[ButtonsJoker[i]].Visible = false;
Texts[TextsPlayer[i]].Visible = false;
}
}
}
else
{
if (_sso.Selection.PartyMode && SongMenus[htSongMenus(SongMenu)].IsSmallView())
SongMenus[htSongMenus(SongMenu)].SetSmallView(false);
if (_sso.Selection.PartyMode && SongMenus[SongMenu].IsSmallView())
SongMenus[SongMenu].SetSmallView(false);
for (int i = 0; i < CMain.Settings.GetMaxNumPlayer(); i++)
{
Buttons[htButtons(ButtonsJoker[i])].Visible = false;
Texts[htTexts(TextsPlayer[i])].Visible = false;
Buttons[ButtonsJoker[i]].Visible = false;
Texts[TextsPlayer[i]].Visible = false;
}
Buttons[htButtons(ButtonStart)].Visible = false;
Buttons[ButtonStart].Visible = false;
}
}
@@ -817,9 +817,9 @@ namespace Vocaluxe.Screens
if ((CSongs.Category >= 0) && (SongNr >= 0))
{
EGameMode gm;
if (_AvailableGameModes.Count >= SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Selection)
if (_AvailableGameModes.Count >= SelectSlides[SelectSlideOptionsMode].Selection)
{
gm = _AvailableGameModes[SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Selection];
gm = _AvailableGameModes[SelectSlides[SelectSlideOptionsMode].Selection];
}
else
{
@@ -1001,7 +1001,7 @@ namespace Vocaluxe.Screens
if (CSongs.IsInCategory)
{
ToggleSongOptions(ESongOptionsView.None);
SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong());
SongMenus[SongMenu].SetSelectedSong(CSongs.GetRandomSong());
return true;
}
return false;
@@ -1012,7 +1012,7 @@ namespace Vocaluxe.Screens
if (!CSongs.IsInCategory)
{
ToggleSongOptions(ESongOptionsView.None);
SongMenus[htSongMenus(SongMenu)].SetSelectedCategory(CSongs.GetRandomCategory());
SongMenus[SongMenu].SetSelectedCategory(CSongs.GetRandomCategory());
return true;
}
return false;
@@ -1021,7 +1021,7 @@ namespace Vocaluxe.Screens
private void JumpTo(char Letter)
{
int start = 0;
int curSelected = SongMenus[htSongMenus(SongMenu)].GetActualSelection();
int curSelected = SongMenus[SongMenu].GetActualSelection();
if (CSongs.IsInCategory)
{
//TODO: Check and use sorting method
@@ -1037,7 +1037,7 @@ namespace Vocaluxe.Screens
if (visibleID < 0 && start > 1)
visibleID = Array.FindIndex<CSong>(Songs, 0, start - 1, element => element.Artist.StartsWith(Letter.ToString(), StringComparison.OrdinalIgnoreCase));
if (visibleID > -1)
SongMenus[htSongMenus(SongMenu)].SetSelectedSong(visibleID);
SongMenus[SongMenu].SetSelectedSong(visibleID);
}
else
{
@@ -1049,7 +1049,7 @@ namespace Vocaluxe.Screens
if (visibleID < 0 && start > 1)
visibleID = Array.FindIndex<CCategory>(Categories, 0, start - 1, element => element.Name.StartsWith(Letter.ToString(), StringComparison.OrdinalIgnoreCase));
if (visibleID > -1)
SongMenus[htSongMenus(SongMenu)].SetSelectedCategory(visibleID);
SongMenus[SongMenu].SetSelectedCategory(visibleID);
}
}
@@ -1062,7 +1062,7 @@ namespace Vocaluxe.Screens
bool refresh = false;
_SearchText = NewFilterString;
int SongIndex = SongMenus[htSongMenus(SongMenu)].GetSelectedSong();
int SongIndex = SongMenus[SongMenu].GetSelectedSong();
int SongID = -1;
if (SongIndex != -1 && CSongs.NumVisibleSongs > 0 && CSongs.NumVisibleSongs > SongIndex)
{
@@ -1087,30 +1087,30 @@ namespace Vocaluxe.Screens
refresh = true;
if (refresh)
SongMenus[htSongMenus(SongMenu)].OnHide();
SongMenus[SongMenu].OnHide();
SongMenus[htSongMenus(SongMenu)].OnShow();
SongMenus[SongMenu].OnShow();
}
private void ToggleSongOptions(ESongOptionsView view)
{
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Visible = false;
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Visible = false;
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].Visible = false;
SelectSlides[htSelectSlides(SelectSlideOptionsNumMedleySongs)].Visible = false;
Buttons[htButtons(ButtonOptionsClose)].Visible = false;
Buttons[htButtons(ButtonOptionsSing)].Visible = false;
Buttons[htButtons(ButtonOptionsPlaylist)].Visible = false;
Buttons[htButtons(ButtonOptionsRandom)].Visible = false;
Buttons[htButtons(ButtonOptionsRandomCategory)].Visible = false;
Buttons[htButtons(ButtonOptionsSingAll)].Visible = false;
Buttons[htButtons(ButtonOptionsSingAllVisible)].Visible = false;
Buttons[htButtons(ButtonOptionsOpenSelectedItem)].Visible = false;
Buttons[htButtons(ButtonOptionsRandomMedley)].Visible = false;
Buttons[htButtons(ButtonOptionsStartMedley)].Visible = false;
Texts[htTexts(TextOptionsTitle)].Visible = false;
Statics[htStatics(StaticOptionsBG)].Visible = false;
Buttons[htButtons(ButtonOpenOptions)].Visible = true;
SelectSlides[SelectSlideOptionsMode].Visible = false;
SelectSlides[SelectSlideOptionsPlaylistAdd].Visible = false;
SelectSlides[SelectSlideOptionsPlaylistOpen].Visible = false;
SelectSlides[SelectSlideOptionsNumMedleySongs].Visible = false;
Buttons[ButtonOptionsClose].Visible = false;
Buttons[ButtonOptionsSing].Visible = false;
Buttons[ButtonOptionsPlaylist].Visible = false;
Buttons[ButtonOptionsRandom].Visible = false;
Buttons[ButtonOptionsRandomCategory].Visible = false;
Buttons[ButtonOptionsSingAll].Visible = false;
Buttons[ButtonOptionsSingAllVisible].Visible = false;
Buttons[ButtonOptionsOpenSelectedItem].Visible = false;
Buttons[ButtonOptionsRandomMedley].Visible = false;
Buttons[ButtonOptionsStartMedley].Visible = false;
Texts[TextOptionsTitle].Visible = false;
Statics[StaticOptionsBG].Visible = false;
Buttons[ButtonOpenOptions].Visible = true;
_SongOptionsActive = view != ESongOptionsView.None;
@@ -1119,10 +1119,10 @@ namespace Vocaluxe.Screens
//Has to be done here otherwhise changed playlist names will not appear until OnShow is called!
UpdatePlaylistNames();
Texts[htTexts(TextOptionsTitle)].Visible = true;
Buttons[htButtons(ButtonOptionsClose)].Visible = true;
Statics[htStatics(StaticOptionsBG)].Visible = true;
Buttons[htButtons(ButtonOpenOptions)].Visible = false;
Texts[TextOptionsTitle].Visible = true;
Buttons[ButtonOptionsClose].Visible = true;
Statics[StaticOptionsBG].Visible = true;
Buttons[ButtonOpenOptions].Visible = false;
if (view == ESongOptionsView.Song)
_ShowSongOptionsSong();
else if (view == ESongOptionsView.General)
@@ -1136,92 +1136,92 @@ namespace Vocaluxe.Screens
{
EGameMode LastMode = EGameMode.TR_GAMEMODE_NORMAL;
if (_AvailableGameModes.Count > 0)
LastMode = _AvailableGameModes[SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Selection];
SetInteractionToButton(Buttons[htButtons(ButtonOptionsSing)]);
LastMode = _AvailableGameModes[SelectSlides[SelectSlideOptionsMode].Selection];
SetInteractionToButton(Buttons[ButtonOptionsSing]);
_AvailableGameModes.Clear();
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Clear();
if (CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].IsDuet)
SelectSlides[SelectSlideOptionsMode].Clear();
if (CSongs.VisibleSongs[SongMenus[SongMenu].GetSelectedSong()].IsDuet)
{
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].AddValue(Enum.GetName(typeof(EGameMode), EGameMode.TR_GAMEMODE_DUET));
SelectSlides[SelectSlideOptionsMode].AddValue(Enum.GetName(typeof(EGameMode), EGameMode.TR_GAMEMODE_DUET));
_AvailableGameModes.Add(EGameMode.TR_GAMEMODE_DUET);
}
else
{
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].AddValue(Enum.GetName(typeof(EGameMode), EGameMode.TR_GAMEMODE_NORMAL));
SelectSlides[SelectSlideOptionsMode].AddValue(Enum.GetName(typeof(EGameMode), EGameMode.TR_GAMEMODE_NORMAL));
_AvailableGameModes.Add(EGameMode.TR_GAMEMODE_NORMAL);
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].AddValue(Enum.GetName(typeof(EGameMode), EGameMode.TR_GAMEMODE_SHORTSONG));
SelectSlides[SelectSlideOptionsMode].AddValue(Enum.GetName(typeof(EGameMode), EGameMode.TR_GAMEMODE_SHORTSONG));
_AvailableGameModes.Add(EGameMode.TR_GAMEMODE_SHORTSONG);
}
if (CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].Medley.Source != EMedleySource.None)
if (CSongs.VisibleSongs[SongMenus[SongMenu].GetSelectedSong()].Medley.Source != EMedleySource.None)
{
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].AddValue(Enum.GetName(typeof(EGameMode), EGameMode.TR_GAMEMODE_MEDLEY));
SelectSlides[SelectSlideOptionsMode].AddValue(Enum.GetName(typeof(EGameMode), EGameMode.TR_GAMEMODE_MEDLEY));
_AvailableGameModes.Add(EGameMode.TR_GAMEMODE_MEDLEY);
}
//Set SelectSlide-Selection to last selected game-mode if possible
for (int i = 0; i < _AvailableGameModes.Count; i++)
{
if (_AvailableGameModes[i] == LastMode)
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].SetSelectionByValueIndex(i);
SelectSlides[SelectSlideOptionsMode].SetSelectionByValueIndex(i);
}
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Visible = true;
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Visible = true;
Buttons[htButtons(ButtonOptionsSing)].Visible = true;
Buttons[htButtons(ButtonOptionsPlaylist)].Visible = true;
SetInteractionToButton(Buttons[htButtons(ButtonOptionsSing)]);
SelectSlides[SelectSlideOptionsMode].Visible = true;
SelectSlides[SelectSlideOptionsPlaylistAdd].Visible = true;
Buttons[ButtonOptionsSing].Visible = true;
Buttons[ButtonOptionsPlaylist].Visible = true;
SetInteractionToButton(Buttons[ButtonOptionsSing]);
}
private void _ShowSongOptionsGeneral()
{
if (CSongs.IsInCategory)
{
Buttons[htButtons(ButtonOptionsRandom)].Visible = true;
Buttons[htButtons(ButtonOptionsSingAllVisible)].Visible = true;
Buttons[ButtonOptionsRandom].Visible = true;
Buttons[ButtonOptionsSingAllVisible].Visible = true;
}
else
Buttons[htButtons(ButtonOptionsRandomCategory)].Visible = true;
Buttons[htButtons(ButtonOptionsSingAll)].Visible = true;
Buttons[htButtons(ButtonOptionsRandomMedley)].Visible = true;
Buttons[htButtons(ButtonOptionsOpenSelectedItem)].Visible = true;
Buttons[ButtonOptionsRandomCategory].Visible = true;
Buttons[ButtonOptionsSingAll].Visible = true;
Buttons[ButtonOptionsRandomMedley].Visible = true;
Buttons[ButtonOptionsOpenSelectedItem].Visible = true;
if (SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].NumValues > 0)
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].Visible = true;
if (SelectSlides[SelectSlideOptionsPlaylistOpen].NumValues > 0)
SelectSlides[SelectSlideOptionsPlaylistOpen].Visible = true;
if (Buttons[htButtons(ButtonOptionsRandom)].Visible)
SetInteractionToButton(Buttons[htButtons(ButtonOptionsRandom)]);
if (Buttons[ButtonOptionsRandom].Visible)
SetInteractionToButton(Buttons[ButtonOptionsRandom]);
else
SetInteractionToButton(Buttons[htButtons(ButtonOptionsRandomCategory)]);
SetInteractionToButton(Buttons[ButtonOptionsRandomCategory]);
}
private void _ShowSongOptionsMedley()
{
Buttons[htButtons(ButtonOptionsStartMedley)].Visible = true;
SelectSlides[htSelectSlides(SelectSlideOptionsNumMedleySongs)].Visible = true;
SelectSlides[htSelectSlides(SelectSlideOptionsNumMedleySongs)].Clear();
Buttons[ButtonOptionsStartMedley].Visible = true;
SelectSlides[SelectSlideOptionsNumMedleySongs].Visible = true;
SelectSlides[SelectSlideOptionsNumMedleySongs].Clear();
if (CSongs.IsInCategory)
{
for (int i = 1; i <= CSongs.VisibleSongs.Length; i++)
{
SelectSlides[htSelectSlides(SelectSlideOptionsNumMedleySongs)].AddValue(i.ToString());
SelectSlides[SelectSlideOptionsNumMedleySongs].AddValue(i.ToString());
}
}
else
{
for (int i = 1; i <= CSongs.AllSongs.Length; i++)
{
SelectSlides[htSelectSlides(SelectSlideOptionsNumMedleySongs)].AddValue(i.ToString());
SelectSlides[SelectSlideOptionsNumMedleySongs].AddValue(i.ToString());
}
}
if (SelectSlides[htSelectSlides(SelectSlideOptionsNumMedleySongs)].NumValues >= 5)
SelectSlides[htSelectSlides(SelectSlideOptionsNumMedleySongs)].SetSelectionByValueIndex(4);
if (SelectSlides[SelectSlideOptionsNumMedleySongs].NumValues >= 5)
SelectSlides[SelectSlideOptionsNumMedleySongs].SetSelectionByValueIndex(4);
else
SelectSlides[htSelectSlides(SelectSlideOptionsNumMedleySongs)].SetSelectionByValueIndex(SelectSlides[htSelectSlides(SelectSlideOptionsNumMedleySongs)].NumValues - 1);
SetInteractionToButton(Buttons[htButtons(ButtonOptionsStartMedley)]);
SelectSlides[SelectSlideOptionsNumMedleySongs].SetSelectionByValueIndex(SelectSlides[SelectSlideOptionsNumMedleySongs].NumValues - 1);
SetInteractionToButton(Buttons[ButtonOptionsStartMedley]);
}
#region Playlist Actions
public void CheckPlaylist()
{
if (Playlists[htPlaylists(Playlist)].ActivePlaylistID == -1 && _PlaylistActive)
if (Playlists[Playlist].ActivePlaylistID == -1 && _PlaylistActive)
ClosePlaylist();
}
@@ -1229,101 +1229,101 @@ namespace Vocaluxe.Screens
{
if (CPlaylists.Playlists.Length > PlaylistID && PlaylistID > -1)
{
Playlists[htPlaylists(Playlist)].LoadPlaylist(PlaylistID);
SongMenus[htSongMenus(SongMenu)].SetSmallView(true);
Playlists[htPlaylists(Playlist)].Visible = true;
Playlists[Playlist].LoadPlaylist(PlaylistID);
SongMenus[SongMenu].SetSmallView(true);
Playlists[Playlist].Visible = true;
}
}
private void ClosePlaylist()
{
if (Playlists[htPlaylists(Playlist)].Visible || _PlaylistActive)
if (Playlists[Playlist].Visible || _PlaylistActive)
{
SongMenus[htSongMenus(SongMenu)].SetSmallView(false);
SongMenus[SongMenu].SetSmallView(false);
_PlaylistActive = false;
Playlists[htPlaylists(Playlist)].Selected = _PlaylistActive;
SongMenus[htSongMenus(SongMenu)].SetActive(!_PlaylistActive);
Playlists[htPlaylists(Playlist)].ClosePlaylist();
Playlists[Playlist].Selected = _PlaylistActive;
SongMenus[SongMenu].SetActive(!_PlaylistActive);
Playlists[Playlist].ClosePlaylist();
}
}
private void UpdatePlaylistNames()
{
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Clear();
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].AddValue("TR_SCREENSONG_NEWPLAYLIST");
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].AddValues(CPlaylists.PlaylistNames);
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].Clear();
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].AddValues(CPlaylists.PlaylistNames);
SelectSlides[SelectSlideOptionsPlaylistAdd].Clear();
SelectSlides[SelectSlideOptionsPlaylistAdd].AddValue("TR_SCREENSONG_NEWPLAYLIST");
SelectSlides[SelectSlideOptionsPlaylistAdd].AddValues(CPlaylists.PlaylistNames);
SelectSlides[SelectSlideOptionsPlaylistOpen].Clear();
SelectSlides[SelectSlideOptionsPlaylistOpen].AddValues(CPlaylists.PlaylistNames);
}
private void OpenPlaylistAction()
{
//Open a playlist
if (Playlists[htPlaylists(Playlist)].ActivePlaylistID != (SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].Selection))
if (Playlists[Playlist].ActivePlaylistID != (SelectSlides[SelectSlideOptionsPlaylistOpen].Selection))
{
Playlists[htPlaylists(Playlist)].ActivePlaylistID = SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].Selection;
Playlists[Playlist].ActivePlaylistID = SelectSlides[SelectSlideOptionsPlaylistOpen].Selection;
SetSelectSlidePlaylistToCurrentPlaylist();
//Open playlist
OpenPlaylist(Playlists[htPlaylists(Playlist)].ActivePlaylistID);
OpenPlaylist(Playlists[Playlist].ActivePlaylistID);
}
}
private void OpenAndAddPlaylistAction()
{
//Open an existing playlist and add song
if (Playlists[htPlaylists(Playlist)].ActivePlaylistID != (SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection - 1) && (SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection - 1) != -1)
if (Playlists[Playlist].ActivePlaylistID != (SelectSlides[SelectSlideOptionsPlaylistAdd].Selection - 1) && (SelectSlides[SelectSlideOptionsPlaylistAdd].Selection - 1) != -1)
{
//Check selected game-mode
EGameMode gm;
if (_AvailableGameModes.Count >= SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Selection)
gm = _AvailableGameModes[SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Selection];
if (_AvailableGameModes.Count >= SelectSlides[SelectSlideOptionsMode].Selection)
gm = _AvailableGameModes[SelectSlides[SelectSlideOptionsMode].Selection];
else
if (CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].IsDuet)
if (CSongs.VisibleSongs[SongMenus[SongMenu].GetSelectedSong()].IsDuet)
gm = EGameMode.TR_GAMEMODE_DUET;
else
gm = EGameMode.TR_GAMEMODE_NORMAL;
//Check if Playlist really exists
if (SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection - 1 >= 0)
if (SelectSlides[SelectSlideOptionsPlaylistAdd].Selection - 1 >= 0)
{
Playlists[htPlaylists(Playlist)].ActivePlaylistID = SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection - 1;
Playlists[Playlist].ActivePlaylistID = SelectSlides[SelectSlideOptionsPlaylistAdd].Selection - 1;
//Add song to playlist
CPlaylists.Playlists[Playlists[htPlaylists(Playlist)].ActivePlaylistID].AddSong(CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].ID, gm);
CPlaylists.Playlists[Playlists[Playlist].ActivePlaylistID].AddSong(CSongs.VisibleSongs[SongMenus[SongMenu].GetSelectedSong()].ID, gm);
//Open playlist
OpenPlaylist(Playlists[htPlaylists(Playlist)].ActivePlaylistID);
OpenPlaylist(Playlists[Playlist].ActivePlaylistID);
SetSelectSlidePlaylistToCurrentPlaylist();
Playlists[htPlaylists(Playlist)].ScrollToBottom();
Playlists[Playlist].ScrollToBottom();
}
}
//Create a new playlist and add song
else if ((SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection - 1) == -1)
else if ((SelectSlides[SelectSlideOptionsPlaylistAdd].Selection - 1) == -1)
{
//Check selected game-mode
EGameMode gm;
if (_AvailableGameModes.Count >= SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Selection)
gm = _AvailableGameModes[SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Selection];
if (_AvailableGameModes.Count >= SelectSlides[SelectSlideOptionsMode].Selection)
gm = _AvailableGameModes[SelectSlides[SelectSlideOptionsMode].Selection];
else
if (CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].IsDuet)
if (CSongs.VisibleSongs[SongMenus[SongMenu].GetSelectedSong()].IsDuet)
gm = EGameMode.TR_GAMEMODE_DUET;
else
gm = EGameMode.TR_GAMEMODE_NORMAL;
//Create new playlist
Playlists[htPlaylists(Playlist)].ActivePlaylistID = CPlaylists.NewPlaylist();
Playlists[Playlist].ActivePlaylistID = CPlaylists.NewPlaylist();
//Add song to playlist
CPlaylists.Playlists[Playlists[htPlaylists(Playlist)].ActivePlaylistID].AddSong(CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].ID, gm);
CPlaylists.Playlists[Playlists[Playlist].ActivePlaylistID].AddSong(CSongs.VisibleSongs[SongMenus[SongMenu].GetSelectedSong()].ID, gm);
//Open playlist
OpenPlaylist(Playlists[htPlaylists(Playlist)].ActivePlaylistID);
OpenPlaylist(Playlists[Playlist].ActivePlaylistID);
//Add new playlist to select-slide
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].AddValue(CPlaylists.Playlists[Playlists[htPlaylists(Playlist)].ActivePlaylistID].PlaylistName);
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].AddValue(CPlaylists.Playlists[Playlists[htPlaylists(Playlist)].ActivePlaylistID].PlaylistName);
SelectSlides[SelectSlideOptionsPlaylistAdd].AddValue(CPlaylists.Playlists[Playlists[Playlist].ActivePlaylistID].PlaylistName);
SelectSlides[SelectSlideOptionsPlaylistOpen].AddValue(CPlaylists.Playlists[Playlists[Playlist].ActivePlaylistID].PlaylistName);
SetSelectSlidePlaylistToCurrentPlaylist();
@@ -1333,25 +1333,25 @@ namespace Vocaluxe.Screens
{
//Check selected game-mode
EGameMode gm;
if (_AvailableGameModes.Count >= SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Selection)
gm = _AvailableGameModes[SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Selection];
if (_AvailableGameModes.Count >= SelectSlides[SelectSlideOptionsMode].Selection)
gm = _AvailableGameModes[SelectSlides[SelectSlideOptionsMode].Selection];
else
if (CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].IsDuet)
if (CSongs.VisibleSongs[SongMenus[SongMenu].GetSelectedSong()].IsDuet)
gm = EGameMode.TR_GAMEMODE_DUET;
else
gm = EGameMode.TR_GAMEMODE_NORMAL;
CPlaylists.Playlists[Playlists[htPlaylists(Playlist)].ActivePlaylistID].AddSong(CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].ID, gm);
Playlists[htPlaylists(Playlist)].UpdatePlaylist();
Playlists[htPlaylists(Playlist)].ScrollToBottom();
CPlaylists.Playlists[Playlists[Playlist].ActivePlaylistID].AddSong(CSongs.VisibleSongs[SongMenus[SongMenu].GetSelectedSong()].ID, gm);
Playlists[Playlist].UpdatePlaylist();
Playlists[Playlist].ScrollToBottom();
}
}
private void SetSelectSlidePlaylistToCurrentPlaylist()
{
if (Playlists[htPlaylists(Playlist)].ActivePlaylistID > -1)
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection = Playlists[htPlaylists(Playlist)].ActivePlaylistID + 1;
if (Playlists[Playlist].ActivePlaylistID > -1)
SelectSlides[SelectSlideOptionsPlaylistAdd].Selection = Playlists[Playlist].ActivePlaylistID + 1;
else
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection = 0;
SelectSlides[SelectSlideOptionsPlaylistAdd].Selection = 0;
}
#endregion Playlist Actions
}
+252 -634
View File
File diff suppressed because it is too large. Load diff