diff --git a/Output/PartyModes/Challenge/Languages/Deutsch.xml b/Output/PartyModes/Challenge/Languages/Deutsch.xml
index e9fffed4..27a17131 100644
--- a/Output/PartyModes/Challenge/Languages/Deutsch.xml
+++ b/Output/PartyModes/Challenge/Languages/Deutsch.xml
@@ -11,6 +11,9 @@
Weiter
Zurück
Start
+ Exit
+ Ja
+ Nein
Nächste Runde
Challenge Modus: Einstellungen
@@ -27,5 +30,7 @@
Siege
Sing-Punkte
Punkte
+ Challenge-Mode wirklich beenden?
+ Spieler der nächsten Runde:
diff --git a/Output/PartyModes/Challenge/Languages/English.xml b/Output/PartyModes/Challenge/Languages/English.xml
index 9663e2f6..6b387836 100644
--- a/Output/PartyModes/Challenge/Languages/English.xml
+++ b/Output/PartyModes/Challenge/Languages/English.xml
@@ -11,6 +11,9 @@
Next
Back
Start
+ Exit
+ Yes
+ No
Next Round
Challenge Mode: Configuration
@@ -27,5 +30,7 @@
Wins
Sing Points
Score
+ Do you really want to exit?
+ Player of next round:
diff --git a/Output/PartyModes/Challenge/Languages/French.xml b/Output/PartyModes/Challenge/Languages/French.xml
index f6474148..3e38ada0 100644
--- a/Output/PartyModes/Challenge/Languages/French.xml
+++ b/Output/PartyModes/Challenge/Languages/French.xml
@@ -11,6 +11,9 @@
TODO: Next
Retour
Démarrer
+ Quitter
+ Oui
+ Non
TODO: Next Round
TODO: Challenge Mode: Configuration
@@ -27,5 +30,7 @@
TODO: Wins
TODO: Sing Points
TODO: Score
+ TODO: Do you really want to exit?
+ TODO: Player of next round:
diff --git a/Output/PartyModes/Challenge/Languages/Spanish.xml b/Output/PartyModes/Challenge/Languages/Spanish.xml
index 1632f219..45144926 100644
--- a/Output/PartyModes/Challenge/Languages/Spanish.xml
+++ b/Output/PartyModes/Challenge/Languages/Spanish.xml
@@ -11,6 +11,9 @@
TODO: Next
Volver
Comenzar
+ Salir
+ Sí
+ No
TODO: Next Round
TODO: Challenge Mode: Configuration
@@ -26,5 +29,7 @@
TODO: Wins
TODO: Sing Points
TODO: Score
+ TODO: Do you really want to exit?
+ TODO: Player of next round:
diff --git a/Output/PartyModes/Challenge/Screens/PartyScreenChallengeMain.xml b/Output/PartyModes/Challenge/Screens/PartyScreenChallengeMain.xml
index e5a8577f..946b68dc 100644
--- a/Output/PartyModes/Challenge/Screens/PartyScreenChallengeMain.xml
+++ b/Output/PartyModes/Challenge/Screens/PartyScreenChallengeMain.xml
@@ -29,6 +29,38 @@
+
+
+ PopupBG
+
+ 449
+ 261
+ -1,00
+ 382
+ 198
+
+
+ StaticColor
+
+
+
+
+
+
+ Invisible
+
+ 0
+ 0
+ 0,00
+ 100
+ 100
+
+
+ StaticColor
+
+
+
+
640
@@ -58,6 +90,35 @@
+
+
+ 640
+ 515
+
+ 0,00
+
+ 32
+
+
+
+ StaticColor
+
+
+ TextSColor
+
+ Center
+
+ Center
+
+
+
+ Outline
+
+ TR_SCREENMAIN_NEXT_PLAYER
+
+
+
+
100
@@ -232,13 +293,73 @@
+
+
+ 0
+ 0
+
+ 0,00
+
+ 32
+
+ 100
+
+
+ StaticColor
+
+
+ TextSColor
+
+ Center
+
+ Center
+
+
+
+ Outline
+
+
+
+
+
+
+
+
+ 640
+ 265
+
+ -1,01
+
+ 32
+
+ 380
+
+
+ StaticColor
+
+
+ TextSColor
+
+ Center
+
+ Center
+
+
+
+ Outline
+
+ TR_SCREENMAIN_POPUP_REALLYEXIT
+
+
+
+
Button
Button
- 985
+ 1030
600
0,00
150
@@ -289,5 +410,233 @@
26
+
+
+ Button
+
+ Button
+
+ 100
+ 600
+ 0,00
+ 150
+ 50
+
+
+ ButtonColor
+
+
+ ButtonSColor
+
+
+ 75
+ 10
+
+ 32
+
+ 142
+
+
+ ButtonTextColor
+
+
+ ButtonTextSColor
+
+ Center
+
+ Center
+
+
+
+ Outline
+
+ TR_BUTTON_BACK
+
+
+
+
+
+ 10
+ 26
+
+
+
+
+
+ 10
+ 26
+
+
+
+
+ Button
+
+ Button
+
+ 100
+ 600
+ 0,00
+ 150
+ 50
+
+
+ ButtonColor
+
+
+ ButtonSColor
+
+
+ 75
+ 10
+
+ 32
+
+ 142
+
+
+ ButtonTextColor
+
+
+ ButtonTextSColor
+
+ Center
+
+ Center
+
+
+
+ Outline
+
+ TR_BUTTON_EXIT
+
+
+
+
+
+ 10
+ 26
+
+
+
+
+
+ 10
+ 26
+
+
+
+
+ Button
+
+ Button
+
+ 665
+ 360
+ -1,01
+ 150
+ 50
+
+
+ ButtonColor
+
+
+ ButtonSColor
+
+
+ 75
+ 10
+
+ 32
+
+ 142
+
+
+ ButtonTextColor
+
+
+ ButtonTextSColor
+
+ Center
+
+ Center
+
+
+
+ Outline
+
+ TR_BUTTON_YES
+
+
+
+
+
+ 10
+ 26
+
+
+
+
+
+ 10
+ 26
+
+
+
+
+ Button
+
+ Button
+
+ 465
+ 360
+ -1,01
+ 150
+ 50
+
+
+ ButtonColor
+
+
+ ButtonSColor
+
+
+ 75
+ 10
+
+ 32
+
+ 142
+
+
+ ButtonTextColor
+
+
+ ButtonTextSColor
+
+ Center
+
+ Center
+
+
+
+ Outline
+
+ TR_BUTTON_NO
+
+
+
+
+
+ 10
+ 26
+
+
+
+
+
+ 10
+ 26
+
+
-
\ No newline at end of file
+
diff --git a/Output/Themes/Ambient/Skin Blue.xml b/Output/Themes/Ambient/Skin Blue.xml
index eb483724..f233aa88 100644
--- a/Output/Themes/Ambient/Skin Blue.xml
+++ b/Output/Themes/Ambient/Skin Blue.xml
@@ -336,6 +336,7 @@
Minus.png
Plus.png
Random.png
+ Popup.png
[Blue]BG_Video.mp4
diff --git a/Output/Themes/Ambient/Skin Green.xml b/Output/Themes/Ambient/Skin Green.xml
index a1865f81..86d67d2b 100644
--- a/Output/Themes/Ambient/Skin Green.xml
+++ b/Output/Themes/Ambient/Skin Green.xml
@@ -330,6 +330,7 @@
Minus.png
Plus.png
Random.png
+ Popup.png
[Green]BG_Video.mp4
diff --git a/Output/Themes/Ambient/Skin Red.xml b/Output/Themes/Ambient/Skin Red.xml
index cdbaebd4..a1cacc90 100644
--- a/Output/Themes/Ambient/Skin Red.xml
+++ b/Output/Themes/Ambient/Skin Red.xml
@@ -330,6 +330,7 @@
Minus.png
Plus.png
Random.png
+ Popup.png
[Red]BG_Video.mp4
diff --git a/Output/Themes/Ambient/Skin Yellow.xml b/Output/Themes/Ambient/Skin Yellow.xml
index 22bb6061..6b0dc676 100644
--- a/Output/Themes/Ambient/Skin Yellow.xml
+++ b/Output/Themes/Ambient/Skin Yellow.xml
@@ -330,6 +330,7 @@
Minus.png
Plus.png
Random.png
+ Popup.png
[Yellow]BG_Video.mp4
diff --git a/PartyModeChallenge/PartyScreenChallengeMain.cs b/PartyModeChallenge/PartyScreenChallengeMain.cs
index 34d361eb..911519c0 100644
--- a/PartyModeChallenge/PartyScreenChallengeMain.cs
+++ b/PartyModeChallenge/PartyScreenChallengeMain.cs
@@ -29,14 +29,27 @@ namespace Vocaluxe.PartyModes
const string TextWon = "TextWon";
const string TextSingPoints = "TextSingPoints";
const string TextGamePoints = "TextGamePoints";
+ const string TextNextPlayer = "TextNextPlayer";
+ const string TextPopupReallyExit = "TextPopupReallyExit";
const string ButtonNextRound = "ButtonNextRound";
+ const string ButtonBack = "ButtonBack";
+ const string ButtonExit = "ButtonExit";
+ const string ButtonPopupYes = "ButtonPopupYes";
+ const string ButtonPopupNo = "ButtonPopupNo";
+ const string StaticPopupBG = "StaticPopupBG";
+ const string StaticNextPlayer = "StaticNextPlayer";
+
+ private bool ExitPopupVisible = false;
private DataFromScreen Data;
private DataToScreenMain GameState;
private List Table;
+ private List NextPlayerTexts;
+ private List NextPlayerStatics;
+
public PartyScreenChallengeMain()
{
Data = new DataFromScreen();
@@ -48,8 +61,9 @@ namespace Vocaluxe.PartyModes
base.Init();
_ThemeName = "PartyScreenChallengeMain";
- _ThemeTexts = new string[] { TextPosition, TextPlayerName, TextNumPlayed, TextWon, TextSingPoints, TextGamePoints };
- _ThemeButtons = new string[] { "ButtonNextRound" };
+ _ThemeTexts = new string[] { TextPosition, TextPlayerName, TextNumPlayed, TextWon, TextSingPoints, TextGamePoints, TextNextPlayer, TextPopupReallyExit };
+ _ThemeButtons = new string[] { ButtonNextRound, ButtonBack, ButtonExit, ButtonPopupYes, ButtonPopupNo };
+ _ThemeStatics = new string[] { StaticPopupBG, StaticNextPlayer };
_ScreenVersion = ScreenVersion;
}
@@ -59,6 +73,17 @@ namespace Vocaluxe.PartyModes
GameState = new DataToScreenMain();
BuildTable();
+
+ NextPlayerTexts = new List();
+ NextPlayerStatics = new List();
+
+ for (int i = 0; i < _PartyMode.GetMaxPlayer(); i++)
+ {
+ NextPlayerTexts.Add(GetNewText(Texts[htTexts(TextNextPlayer)]));
+ AddText(NextPlayerTexts[NextPlayerTexts.Count - 1]);
+ NextPlayerStatics.Add(GetNewStatic(Statics[htStatics(StaticNextPlayer)]));
+ AddStatic(NextPlayerStatics[NextPlayerStatics.Count - 1]);
+ }
}
public override void DataToScreen(object ReceivedData)
@@ -91,12 +116,32 @@ namespace Vocaluxe.PartyModes
{
case Keys.Back:
case Keys.Escape:
- EndParty();
+ if (!ExitPopupVisible)
+ if (GameState.CurrentRoundNr == 1)
+ Back();
+ else
+ ShowPopup(true);
+ else
+ ShowPopup(false);
break;
case Keys.Enter:
- if (Buttons[htButtons(ButtonNextRound)].Selected)
- NextRound();
+ if (!ExitPopupVisible)
+ {
+ if (Buttons[htButtons(ButtonNextRound)].Selected)
+ NextRound();
+ if (Buttons[htButtons(ButtonBack)].Selected && GameState.CurrentRoundNr == 1)
+ Back();
+ if (Buttons[htButtons(ButtonExit)].Selected && GameState.CurrentRoundNr > 1)
+ ShowPopup(true);
+ }
+ else
+ {
+ if (Buttons[htButtons(ButtonPopupYes)].Selected)
+ EndParty();
+ if (Buttons[htButtons(ButtonPopupNo)].Selected)
+ ShowPopup(false);
+ }
break;
}
}
@@ -109,13 +154,33 @@ namespace Vocaluxe.PartyModes
if (MouseEvent.LB && IsMouseOver(MouseEvent))
{
- if (Buttons[htButtons(ButtonNextRound)].Selected)
- NextRound();
+ if (!ExitPopupVisible)
+ {
+ if (Buttons[htButtons(ButtonNextRound)].Selected)
+ NextRound();
+ if (Buttons[htButtons(ButtonBack)].Selected && GameState.CurrentRoundNr == 1)
+ Back();
+ if (Buttons[htButtons(ButtonExit)].Selected && GameState.CurrentRoundNr > 1)
+ ShowPopup(true);
+ }
+ else
+ {
+ if (Buttons[htButtons(ButtonPopupYes)].Selected)
+ EndParty();
+ if (Buttons[htButtons(ButtonPopupNo)].Selected)
+ ShowPopup(false);
+ }
}
if (MouseEvent.RB)
{
- EndParty();
+ if (!ExitPopupVisible)
+ if (GameState.CurrentRoundNr == 1)
+ Back();
+ else
+ ShowPopup(true);
+ else
+ ShowPopup(false);
}
return true;
@@ -126,6 +191,21 @@ namespace Vocaluxe.PartyModes
base.OnShow();
Updatetable();
+ UpdateNextPlayerPositions();
+ UpdateNextPlayerContents();
+
+ if (GameState.CurrentRoundNr == 1)
+ {
+ Buttons[htButtons(ButtonBack)].Visible = true;
+ Buttons[htButtons(ButtonExit)].Visible = false;
+ }
+ else
+ {
+ Buttons[htButtons(ButtonBack)].Visible = false;
+ Buttons[htButtons(ButtonExit)].Visible = true;
+ }
+
+ ShowPopup(false);
}
public override bool UpdateGame()
@@ -152,7 +232,63 @@ namespace Vocaluxe.PartyModes
private void EndParty()
{
- //TODO
+ FadeTo(EScreens.ScreenParty);
+ }
+
+ private void ShowPopup(bool Visible)
+ {
+ ExitPopupVisible = Visible;
+
+ Statics[htStatics(StaticPopupBG)].Visible = ExitPopupVisible;
+ Texts[htTexts(TextPopupReallyExit)].Visible = ExitPopupVisible;
+ Buttons[htButtons(ButtonPopupYes)].Visible = ExitPopupVisible;
+ Buttons[htButtons(ButtonPopupNo)].Visible = ExitPopupVisible;
+
+ SetInteractionToButton(Buttons[htButtons(ButtonPopupNo)]);
+ }
+
+ private void Back()
+ {
+ Data.ScreenMain.FadeToNameSelection = true;
+ Data.ScreenMain.FadeToSongSelection = false;
+ _PartyMode.DataFromScreen(_ThemeName, Data);
+ }
+
+ private void UpdateNextPlayerPositions()
+ {
+ float x = _Base.Settings.GetRenderW()/2 - ((GameState.NumPlayerAtOnce * Statics[htStatics(StaticNextPlayer)].Rect.W) + ((GameState.NumPlayerAtOnce-1) * 15))/2;
+ float static_y = 590;
+ float text_y = 550;
+ for (int i = 0; i < GameState.NumPlayerAtOnce; i++)
+ {
+ //static
+ NextPlayerStatics[i].Rect.X = x;
+ NextPlayerStatics[i].Rect.Y = static_y;
+ NextPlayerStatics[i].Visible = true;
+ //text
+ NextPlayerTexts[i].X = x + Statics[htStatics(StaticNextPlayer)].Rect.W / 2;
+ NextPlayerTexts[i].Y = text_y;
+ NextPlayerTexts[i].Visible = true;
+
+ x += Statics[htStatics(StaticNextPlayer)].Rect.W + 15;
+ }
+ for (int i = GameState.NumPlayerAtOnce; i < _PartyMode.GetMaxPlayer(); i++)
+ {
+ NextPlayerStatics[i].Visible = false;
+ NextPlayerTexts[i].Visible = false;
+ }
+ }
+
+ private void UpdateNextPlayerContents()
+ {
+ SProfile[] profiles = _Base.Profiles.GetProfiles();
+ for (int i = 0; i < GameState.NumPlayerAtOnce; i++)
+ {
+ int pid = GameState.Combs[GameState.CurrentRoundNr - 1].Player[i];
+ NextPlayerStatics[i].Texture = profiles[GameState.ProfileIDs[pid]].Avatar.Texture;
+ NextPlayerTexts[i].Text = profiles[GameState.ProfileIDs[pid]].PlayerName;
+ NextPlayerTexts[i].Color = _Base.Theme.GetPlayerColor((i+1));
+ }
}
private void BuildTable()