From 2d0387fb719030e85d95efdda79ea67dc136f1b2 Mon Sep 17 00:00:00 2001 From: Alexander Eckart Date: Mon, 10 Dec 2012 20:01:41 +0100 Subject: [PATCH] added party selection screen --- Output/Languages/Deutsch.xml | 3 + Output/Languages/English.xml | 3 + Output/Languages/French.xml | 3 + Output/Languages/Spanish.xml | 3 + Output/Themes/Ambient/Screens/ScreenMain.xml | 57 +++++++++ Output/Themes/Ambient/Screens/ScreenParty.xml | 119 ++++++++++++++++++ Vocaluxe/Menu/CGraphics.cs | 3 +- Vocaluxe/Screens/CScreenMain.cs | 9 +- Vocaluxe/Screens/CScreenParty.cs | 104 +++++++++++++++ Vocaluxe/Vocaluxe.csproj | 1 + 10 files changed, 303 insertions(+), 2 deletions(-) create mode 100644 Output/Themes/Ambient/Screens/ScreenParty.xml create mode 100644 Vocaluxe/Screens/CScreenParty.cs diff --git a/Output/Languages/Deutsch.xml b/Output/Languages/Deutsch.xml index 98c84333..535fc040 100644 --- a/Output/Languages/Deutsch.xml +++ b/Output/Languages/Deutsch.xml @@ -103,8 +103,11 @@ Hauptmenü Singen + Party Optionen Profile + + Party-Modus Auswahl Spielerauswahl Spieler diff --git a/Output/Languages/English.xml b/Output/Languages/English.xml index c07c4636..a6e01df6 100644 --- a/Output/Languages/English.xml +++ b/Output/Languages/English.xml @@ -103,8 +103,11 @@ Main Menu Sing + Party Options Profiles + + Party Mode Selection Player Selection Player diff --git a/Output/Languages/French.xml b/Output/Languages/French.xml index c4a7f455..bdcb6150 100644 --- a/Output/Languages/French.xml +++ b/Output/Languages/French.xml @@ -103,8 +103,11 @@ Menu Principal Chanter + TODO: Party Options Profils + + TODO: Party Mode Selection Sélection des joueurs Joueur diff --git a/Output/Languages/Spanish.xml b/Output/Languages/Spanish.xml index 12adb00e..219c18f3 100644 --- a/Output/Languages/Spanish.xml +++ b/Output/Languages/Spanish.xml @@ -97,8 +97,11 @@ Menú Principal Cantar + TODO: Party Opciones Perfiles + + TODO: Party Mode Selection Selección de Jugadores Jugador diff --git a/Output/Themes/Ambient/Screens/ScreenMain.xml b/Output/Themes/Ambient/Screens/ScreenMain.xml index 71116b93..cff309a2 100644 --- a/Output/Themes/Ambient/Screens/ScreenMain.xml +++ b/Output/Themes/Ambient/Screens/ScreenMain.xml @@ -86,6 +86,63 @@ 26 + + + Button + + Button + + 355 + 600 + 0,00 + 150 + 50 + + + ButtonColor + + + ButtonSColor + + + 75 + 10 + + 32 + + 142 + + + ButtonTextColor + + + ButtonTextSColor + + Center + + Center + + + + Outline + + TR_SCREENMAIN_BUTTON_PARTY + + + + + + 10 + 26 + + + + + + 10 + 26 + + Button diff --git a/Output/Themes/Ambient/Screens/ScreenParty.xml b/Output/Themes/Ambient/Screens/ScreenParty.xml new file mode 100644 index 00000000..d39aed15 --- /dev/null +++ b/Output/Themes/Ambient/Screens/ScreenParty.xml @@ -0,0 +1,119 @@ + + + + 1 + + + Video + + + + BG_Default + + + BackgroundColor + + + + Menu + + 40 + 40 + 0,00 + 1200 + 50 + + + StaticColor + + + + + + + 640 + 48 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + Center + + + + Outline + + TR_SCREENPARTY_TITLE + + + + + + + Button + + Button + + 985 + 600 + 0,00 + 150 + 50 + + + ButtonColor + + + ButtonSColor + + + 75 + 10 + + 32 + + 142 + + + ButtonTextColor + + + ButtonTextSColor + + Center + + Center + + + + Outline + + TR_BUTTON_EXIT + + + + + + 10 + 26 + + + + + + 10 + 26 + + + + \ No newline at end of file diff --git a/Vocaluxe/Menu/CGraphics.cs b/Vocaluxe/Menu/CGraphics.cs index 75b8b52e..d9f220ae 100644 --- a/Vocaluxe/Menu/CGraphics.cs +++ b/Vocaluxe/Menu/CGraphics.cs @@ -31,8 +31,8 @@ namespace Vocaluxe.Menu ScreenOptionsTheme = 14, ScreenNames = 15, - ScreenCredits = 16, + ScreenParty = 17, ScreenNull = -1 } @@ -244,6 +244,7 @@ namespace Vocaluxe.Menu _Screens.Add(new CScreenOptionsTheme()); _Screens.Add(new CScreenNames()); _Screens.Add(new CScreenCredits()); + _Screens.Add(new CScreenParty()); _PopupScreens.Add(new CPopupScreenPlayerControl()); _PopupScreens.Add(new CPopupScreenVolumeControl()); diff --git a/Vocaluxe/Screens/CScreenMain.cs b/Vocaluxe/Screens/CScreenMain.cs index 76dd28c0..1ff107ce 100644 --- a/Vocaluxe/Screens/CScreenMain.cs +++ b/Vocaluxe/Screens/CScreenMain.cs @@ -19,6 +19,7 @@ namespace Vocaluxe.Screens const int ScreenVersion = 1; const string ButtonSing = "ButtonSing"; + const string ButtonParty = "ButtonParty"; const string ButtonOptions = "ButtonOptions"; const string ButtonProfiles = "ButtonProfiles"; const string ButtonExit = "ButtonExit"; @@ -37,7 +38,7 @@ namespace Vocaluxe.Screens _ThemeName = "ScreenMain"; _ScreenVersion = ScreenVersion; _ThemeStatics = new string[] { "StaticMenuBar" }; - _ThemeButtons = new string[] { ButtonSing, ButtonOptions, ButtonProfiles, ButtonExit }; + _ThemeButtons = new string[] { ButtonSing, ButtonParty, ButtonOptions, ButtonProfiles, ButtonExit }; } public override void LoadTheme() @@ -77,6 +78,9 @@ namespace Vocaluxe.Screens if (Buttons[htButtons(ButtonSing)].Selected) CGraphics.FadeTo(EScreens.ScreenSong); + if (Buttons[htButtons(ButtonParty)].Selected) + CGraphics.FadeTo(EScreens.ScreenParty); + if (Buttons[htButtons(ButtonOptions)].Selected) CGraphics.FadeTo(EScreens.ScreenOptions); @@ -101,6 +105,9 @@ namespace Vocaluxe.Screens if (Buttons[htButtons(ButtonSing)].Selected) CGraphics.FadeTo(EScreens.ScreenSong); + if (Buttons[htButtons(ButtonParty)].Selected) + CGraphics.FadeTo(EScreens.ScreenParty); + if (Buttons[htButtons(ButtonOptions)].Selected) CGraphics.FadeTo(EScreens.ScreenOptions); diff --git a/Vocaluxe/Screens/CScreenParty.cs b/Vocaluxe/Screens/CScreenParty.cs new file mode 100644 index 00000000..0d397743 --- /dev/null +++ b/Vocaluxe/Screens/CScreenParty.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows.Forms; + +using Vocaluxe.Base; +using Vocaluxe.Menu; + +namespace Vocaluxe.Screens +{ + class CScreenParty : CMenu + {// Version number for theme files. Increment it, if you've changed something on the theme files! + const int ScreenVersion = 1; + + const string ButtonExit = "ButtonExit"; + + public CScreenParty() + { + Init(); + } + + protected override void Init() + { + base.Init(); + + _ThemeName = "ScreenParty"; + _ScreenVersion = ScreenVersion; + _ThemeButtons = new string[] { ButtonExit }; + } + + public override void LoadTheme() + { + base.LoadTheme(); + } + + public override bool HandleInput(KeyEvent KeyEvent) + { + base.HandleInput(KeyEvent); + + if (KeyEvent.KeyPressed) + { + + } + else + { + switch (KeyEvent.Key) + { + case Keys.Back: + case Keys.Escape: + CGraphics.FadeTo(EScreens.ScreenMain); + break; + + case Keys.Enter: + if (Buttons[htButtons(ButtonExit)].Selected) + CGraphics.FadeTo(EScreens.ScreenMain); + break; + } + } + return true; + } + + public override bool HandleMouse(MouseEvent MouseEvent) + { + base.HandleMouse(MouseEvent); + + if (MouseEvent.LB && IsMouseOver(MouseEvent)) + { + + if (Buttons[htButtons(ButtonExit)].Selected) + CGraphics.FadeTo(EScreens.ScreenMain); + } + + if (MouseEvent.RB) + { + CGraphics.FadeTo(EScreens.ScreenMain); + } + + return true; + } + + public override void OnShow() + { + base.OnShow(); + } + + public override bool UpdateGame() + { + return true; + } + + public override bool Draw() + { + base.DrawBG(); + base.DrawFG(); + + return true; + } + + public override void OnClose() + { + base.OnClose(); + } + } +} diff --git a/Vocaluxe/Vocaluxe.csproj b/Vocaluxe/Vocaluxe.csproj index 35339243..a2f3d82a 100644 --- a/Vocaluxe/Vocaluxe.csproj +++ b/Vocaluxe/Vocaluxe.csproj @@ -262,6 +262,7 @@ +