From 661f8f14bc1fa871d37f716a4d670522abbc1972 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Tue, 13 Mar 2012 12:27:08 +0100 Subject: [PATCH 01/42] Added text to credits-screen. --- Vocaluxe/Screens/CScreenCredits.cs | 86 ++++++++++++++++++++++++++++-- 1 file changed, 81 insertions(+), 5 deletions(-) diff --git a/Vocaluxe/Screens/CScreenCredits.cs b/Vocaluxe/Screens/CScreenCredits.cs index 278b4720..ba8f1fec 100644 --- a/Vocaluxe/Screens/CScreenCredits.cs +++ b/Vocaluxe/Screens/CScreenCredits.cs @@ -41,6 +41,10 @@ namespace Vocaluxe.Screens private Stopwatch LogoTimer; private Stopwatch CreditsTimer; + private Stopwatch TextTimer; + + private List paragraphs; + private List paragraphTexts; public CScreenCredits() { @@ -56,6 +60,26 @@ namespace Vocaluxe.Screens LogoTimer = new Stopwatch(); CreditsTimer = new Stopwatch(); + TextTimer = new Stopwatch(); + + //Text for last part of credits. + paragraphTexts = new List(); + paragraphs = new List(); + string paragraph = "Inspired by the achievements of UltraStar Deluxe and its variants and pursuing the goal of making a good thing even better, we ended up rewriting the game from scratch. And a new implementation in a new programming language called for a new name - and VOCALUXE it is!"; + string[] words = paragraph.Split(new Char[] { ' ' }); + paragraphs.Add(words); + + paragraph = "This first public version has already implemented many of the original features and it is fully compatible with all the song files in your existing song collection. The code design allows a much faster implementation of new features, thus the roadmap for the next few stable releases is packed and we expect much shorter release cycles than ever before. And, of course, our and your ideas may be the features of tomorrow."; + words = paragraph.Split(new Char[] { ' ' }); + paragraphs.Add(words); + + paragraph = "We appreciate the feedback in the beta release phase and are, of course, always open for bug reports, suggestions for improve- ments and ideas for new features. We would also like to thank the translators who make Vocaluxe an international experience from the very beginning. Last, but most definitely not least, we thank all those diligent song makers out there - there's a song for everyone!"; + words = paragraph.Split(new Char[] { ' ' }); + paragraphs.Add(words); + + paragraph = "Go ahead and grab your mics, crank up your stereo, warm up your voice and get ready to sing to the best of your abilities!"; + words = paragraph.Split(new Char[] { ' ' }); + paragraphs.Add(words); } public override bool HandleInput(KeyEvent KeyEvent) @@ -210,9 +234,39 @@ namespace Vocaluxe.Screens CreditEntryPinky007.direction = EDirection.Right; _CreditNames.Add(CreditEntryPinky007); + //Prepare Text + int lastY = 280; + for (int i = 0; i < paragraphs.Count; i++) + { + string line = ""; + for (int e = 0; e < paragraphs[i].Length; e++ ) + { + if (paragraphs[i][e] != null) + { + string newline = line + " " + paragraphs[i][e]; + CText text = new CText(75, lastY, -2, 30, -1, EAlignment.Left, EStyle.Bold, "Outline", new SColorF(1, 1, 1, 1), line); + if (CDraw.GetTextBounds(text).Width < (CSettings.iRenderW - 160)) + { + line = line + " " + paragraphs[i][e]; - //CreditEntry.image = new CStatic(tex, new SColorF(1, 1, 1, 1), new SRectF(0, 0, 350, 110, -4)); - + //Check if all words are used + if ((e + 1) == paragraphs[i].Length) + { + text.Text = line; + paragraphTexts.Add(text); + line = ""; + lastY += 40; + } + } + else + { + paragraphTexts.Add(text); + line = " "+paragraphs[i][e]; + lastY += 27; + } + } + } + } } public override void OnShowFinish() @@ -247,6 +301,15 @@ namespace Vocaluxe.Screens _CreditNames[i].particle.Draw(); } } + + //Draw Text + if (TextTimer.IsRunning) + { + for (int i = 0; i < paragraphTexts.Count; i++) + { + paragraphTexts[i].Draw(); + } + } return true; } @@ -347,12 +410,13 @@ namespace Vocaluxe.Screens //Check, if last name is set to false if (i == _CreditNames.Count - 1) { - //Will later fade to Main-Screen - active = false; - //Stop and reset timer for next time CreditsTimer.Stop(); CreditsTimer.Reset(); + + //Start Text-Timer + TextTimer.Start(); + active = true; } } break; @@ -361,6 +425,18 @@ namespace Vocaluxe.Screens } } + if (TextTimer.IsRunning) + { + if (TextTimer.ElapsedMilliseconds > 10000) + { + active = false; + } + else + { + active = true; + } + } + return active; } } From 0456eb6493d08c6d72b156b9cb75d20fa735950b Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Sat, 31 Mar 2012 00:34:12 +0200 Subject: [PATCH 02/42] First step of 6-player-singing. Maybe very unstable, buggy and busy. There is still a lot to to do: - NamesScreen (Drag/Drop-Visibility, Scrolling, Using Keyboard...) - ScoreScreen (For 5+6 players) But please check and test :) --- Output/Languages/Deutsch.xml | 9 +- Output/Languages/English.xml | 9 +- Output/Languages/French.xml | 9 +- Output/Languages/Spanish.xml | 9 +- Output/Themes/Ambient/Screens/ScreenNames.xml | 587 ++-- .../Ambient/Screens/ScreenOptionsRecord.xml | 4 +- Output/Themes/Ambient/Screens/ScreenScore.xml | 2453 ++++++++++++++++- Output/Themes/Ambient/Screens/ScreenSing.xml | 724 ++++- Output/Themes/Ambient/Skin Blue.xml | 8 +- Output/Themes/Ambient/Skin Green.xml | 8 +- Output/Themes/Ambient/Skin Red.xml | 8 +- Output/Themes/Ambient/Skin Yellow.xml | 8 +- .../Changelog/Changelog_ScreenNames.txt | 16 + .../Changelog/Changelog_ScreenScore.txt | 7 + .../Themes/Changelog/Changelog_ScreenSing.txt | 5 + Vocaluxe/Base/CConfig.cs | 2 + Vocaluxe/Base/CSettings.cs | 2 +- Vocaluxe/Menu/CInteraction.cs | 3 +- Vocaluxe/Menu/CMenu.cs | 102 + Vocaluxe/Screens/CScreenNames.cs | 240 +- Vocaluxe/Screens/CScreenScore.cs | 2 +- Vocaluxe/Screens/CScreenSing.cs | 2 +- Vocaluxe/Vocaluxe.csproj | 1 + 23 files changed, 3800 insertions(+), 418 deletions(-) create mode 100644 Output/Themes/Changelog/Changelog_ScreenNames.txt create mode 100644 Output/Themes/Changelog/Changelog_ScreenScore.txt diff --git a/Output/Languages/Deutsch.xml b/Output/Languages/Deutsch.xml index be0b28c6..56978034 100644 --- a/Output/Languages/Deutsch.xml +++ b/Output/Languages/Deutsch.xml @@ -101,9 +101,12 @@ Profile Spielerauswahl - 1 Spieler - 2 Spieler - 3 Spieler + 1 Spieler + 2 Spieler + 3 Spieler + 4 Spieler + 5 Spieler + 6 Spieler Warnung: Dem Spieler %v ist kein Mikrofon zugeordnet! Warnung: Den Spielern %v sind keine Mikrofone zugeordnet! diff --git a/Output/Languages/English.xml b/Output/Languages/English.xml index 50a87ba8..0b543a31 100644 --- a/Output/Languages/English.xml +++ b/Output/Languages/English.xml @@ -101,9 +101,12 @@ Profiles Player Selection - 1 Player - 2 Player - 3 Player + 1 Player + 2 Player + 3 Player + 4 Player + 5 Player + 6 Player Warning: There is no mic assigned to player %v! Warning: There are no mics assigned to players %v! diff --git a/Output/Languages/French.xml b/Output/Languages/French.xml index 2c2f7944..74c3e558 100644 --- a/Output/Languages/French.xml +++ b/Output/Languages/French.xml @@ -101,9 +101,12 @@ Profils Sélection des joueurs - 1 joueur - 2 joueurs - 3 joueurs + 1 joueur + 2 joueurs + 3 joueurs + 4 joueurs + 5 joueurs + 6 joueurs Attention: Aucun micro n'est assigné au joueur %v! Attention: Aucun micro n'est assigné aux joueurs %v! diff --git a/Output/Languages/Spanish.xml b/Output/Languages/Spanish.xml index d304e24c..3516d39d 100644 --- a/Output/Languages/Spanish.xml +++ b/Output/Languages/Spanish.xml @@ -101,9 +101,12 @@ Perfiles Selección de Jugadores - Jugador 1 - Jugador 2 - Jugador 3 + Jugador 1 + Jugador 2 + Jugador 3 + Jugador 4 + Jugador 5 + Jugador 6 Advertencia: ¡No hay micrófonos asignados al jugador %v! Advertencia: ¡No hay micrófonos asignados a los jugadores %v! diff --git a/Output/Themes/Ambient/Screens/ScreenNames.xml b/Output/Themes/Ambient/Screens/ScreenNames.xml index 20a2026b..516f554d 100644 --- a/Output/Themes/Ambient/Screens/ScreenNames.xml +++ b/Output/Themes/Ambient/Screens/ScreenNames.xml @@ -1,7 +1,7 @@  - 1 + 2 Video @@ -29,6 +29,102 @@ + + + Button + + 15 + 100 + 0,00 + 100 + 100 + + + StaticColor + + + + + + + Button + + 15 + 255 + 0,00 + 100 + 100 + + + StaticColor + + + + + + + Button + + 15 + 410 + 0,00 + 100 + 100 + + + StaticColor + + + + + + + Button + + 1165 + 100 + 0,00 + 100 + 100 + + + StaticColor + + + + + + + Button + + 1165 + 255 + 0,00 + 100 + 100 + + + StaticColor + + + + + + + Button + + 1165 + 410 + 0,00 + 100 + 100 + + + StaticColor + + + + Invisible @@ -72,6 +168,168 @@ + + + 65 + 203 + + 0,00 + + 20 + + + + Player1 + + + TextSColor + + Center + + + + Outline + + + + + + + + + 65 + 358 + + 0,00 + + 20 + + + + Player2 + + + TextSColor + + Center + + + + Outline + + + + + + + + + 65 + 513 + + 0,00 + + 20 + + + + Player3 + + + TextSColor + + Center + + + + Outline + + + + + + + + + 1205 + 203 + + 0,00 + + 20 + + + + Player4 + + + TextSColor + + Center + + + + Outline + + + + + + + + + 1205 + 358 + + 0,00 + + 20 + + + + Player5 + + + TextSColor + + Center + + + + Outline + + + + + + + + + 1205 + 513 + + 0,00 + + 20 + + + + Player6 + + + TextSColor + + Center + + + + Outline + + + + + + 640 @@ -210,148 +468,7 @@ 26 - - - Button - - Button - - 145 - 150 - 0,00 - 150 - 50 - - - ButtonColor - - - ButtonSColor - - - 75 - 10 - - 32 - - 142 - - - ButtonTextSColor - - - ButtonTextSColor - - Center - - - - Outline - - TR_SCREENNAMES_BUTTON_1PLAYER - - - - - - - - - - - Button - - Button - - 145 - 315 - 0,00 - 150 - 50 - - - ButtonColor - - - ButtonSColor - - - 75 - 10 - - 32 - - 142 - - - ButtonTextSColor - - - ButtonTextSColor - - Center - - - - Outline - - TR_SCREENNAMES_BUTTON_2PLAYER - - - - - - - - - - - Button - - Button - - 145 - 480 - 0,00 - 150 - 50 - - - ButtonColor - - - ButtonSColor - - - 75 - 10 - - 32 - - 142 - - - ButtonTextSColor - - - ButtonTextSColor - - Center - - - - Outline - - TR_SCREENNAMES_BUTTON_3PLAYER - - - - - - - - - + Invisible @@ -367,32 +484,32 @@ SelectSlidePlayer - 305 - 100 + 70 + 545 0,00 - 905 - 150 + 1140 + 45 - 305 - 155 + 75 + 550 0,00 40 40 - 1180 - 155 + 1170 + 550 0,00 40 40 - Player1Dim + SelectSlideColor - Player1Dim + SelectSlideSColor - Player1 + SelectSlideHColor ArrowColor @@ -404,7 +521,7 @@ TextColor - Player1 + TextSColor 32,00 @@ -415,136 +532,32 @@ Bold 6 - - - - Invisible - - SelectSlideArrowLeft - - SelectSlideArrowRight - - SelectSlidePlayer - - SelectSlideArrowLeft - - SelectSlideArrowRight - - SelectSlidePlayer - - 305 - 265 - 0,00 - 905 - 150 - - 305 - 320 - 0,00 - 40 - 40 - - 1180 - 320 - 0,00 - 40 - 40 - - - Player2Dim - - - Player2Dim - - - Player2 - - - ArrowColor - - - ArrowSColor - - - TextColor - - - Player2 - - 32,00 - - 186,00 - - Outline - - Bold - - 6 - - - - Invisible - - SelectSlideArrowLeft - - SelectSlideArrowRight - - SelectSlidePlayer - - SelectSlideArrowLeft - - SelectSlideArrowRight - - SelectSlidePlayer - - 305 - 430 - 0,00 - 905 - 150 - - 305 - 485 - 0,00 - 40 - 40 - - 1180 - 485 - 0,00 - 40 - 40 - - - Player3Dim - - - Player3Dim - - - Player3 - - - ArrowColor - - - ArrowSColor - - - TextColor - - - Player3 - - 32,00 - - 186,00 - - Outline - - Bold - - 6 - + + + 150 + 100 + 0,00 + 1020 + 500 + Button + SelectSlideSColor + Button + SelectSlideSColor + + 100 + 100 + 8 + 3 + 15 + 30 + + 2 + Outline + TextColor + + 15 + + + - \ No newline at end of file + diff --git a/Output/Themes/Ambient/Screens/ScreenOptionsRecord.xml b/Output/Themes/Ambient/Screens/ScreenOptionsRecord.xml index 0e43d77c..06cbccf2 100644 --- a/Output/Themes/Ambient/Screens/ScreenOptionsRecord.xml +++ b/Output/Themes/Ambient/Screens/ScreenOptionsRecord.xml @@ -704,7 +704,7 @@ Bold - 4 + 7 @@ -769,7 +769,7 @@ Bold - 4 + 7 diff --git a/Output/Themes/Ambient/Screens/ScreenScore.xml b/Output/Themes/Ambient/Screens/ScreenScore.xml index 1673c63e..cb3ec553 100644 --- a/Output/Themes/Ambient/Screens/ScreenScore.xml +++ b/Output/Themes/Ambient/Screens/ScreenScore.xml @@ -1,7 +1,7 @@  - 1 + 2 Video @@ -378,6 +378,831 @@ 40 + + + PointsBarBG + + 190 + 180 + 0,00 + 160 + 220 + + + 0,00 + 0,00 + 1,00 + 0,75 + + + + + + + PointsBar + + 190 + 180 + 0,00 + 160 + 0 + + + Player1 + + + + + + + + + 190 + 410 + 0,00 + 160 + 160 + + + Visible + + + + + 15 + 40 + + + + + PointsBarBG + + 422 + 180 + 0,00 + 160 + 220 + + + 1,00 + 0,00 + 0,00 + 0,75 + + + + + + + PointsBar + + 422 + 180 + 0,00 + 160 + 0 + + + Player2 + + + + + + + + + 422 + 410 + 0,00 + 160 + 160 + + + Visible + + + + + 15 + 40 + + + + + PointsBarBG + + 654 + 180 + 0,00 + 160 + 220 + + + 0,00 + 1,00 + 0,00 + 0,75 + + + + + + + PointsBar + + 654 + 180 + 0,00 + 160 + 0 + + + Player3 + + + + + + + + + 654 + 410 + 0,00 + 160 + 160 + + + Visible + + + + + 15 + 40 + + + + + PointsBarBG + + 886 + 180 + 0,00 + 160 + 220 + + + 0,50 + 0,00 + 1,00 + 0,75 + + + + + + + PointsBar + + 886 + 180 + 0,00 + 160 + 0 + + + Player4 + + + + + + + + + 886 + 410 + 0,00 + 160 + 160 + + + Visible + + + + + 15 + 40 + + + + + PointsBarBG + + 352 + 180 + 0,00 + 160 + 220 + + + 0,00 + 0,00 + 1,00 + 0,75 + + + + + + + PointsBar + + 352 + 180 + 0,00 + 160 + 0 + + + Player1 + + + + + + + + + 352 + 410 + 0,00 + 160 + 160 + + + Visible + + + + + 15 + 40 + + + + + PointsBarBG + + 768 + 180 + 0,00 + 160 + 220 + + + 1,00 + 0,00 + 0,00 + 0,75 + + + + + + + PointsBar + + 768 + 180 + 0,00 + 160 + 0 + + + Player2 + + + + + + + + + 768 + 410 + 0,00 + 160 + 160 + + + Visible + + + + + 15 + 40 + + + + + PointsBarBG + + 352 + 180 + 0,00 + 160 + 220 + + + 0,00 + 0,00 + 1,00 + 0,75 + + + + + + + PointsBar + + 352 + 180 + 0,00 + 160 + 0 + + + Player1 + + + + + + + + + 352 + 410 + 0,00 + 160 + 160 + + + Visible + + + + + 15 + 40 + + + + + PointsBarBG + + 768 + 180 + 0,00 + 160 + 220 + + + 1,00 + 0,00 + 0,00 + 0,75 + + + + + + + PointsBar + + 768 + 180 + 0,00 + 160 + 0 + + + Player4 + + + + + + + + + 768 + 410 + 0,00 + 160 + 160 + + + Visible + + + + + 15 + 40 + + + + + PointsBarBG + + 768 + 180 + 0,00 + 160 + 220 + + + 1,00 + 0,00 + 0,00 + 0,75 + + + + + + + PointsBar + + 768 + 180 + 0,00 + 160 + 0 + + + Player5 + + + + + + + + + 768 + 410 + 0,00 + 160 + 160 + + + Visible + + + + + 15 + 40 + + + + + PointsBarBG + + 352 + 180 + 0,00 + 160 + 220 + + + 0,00 + 0,00 + 1,00 + 0,75 + + + + + + + PointsBar + + 352 + 180 + 0,00 + 160 + 0 + + + Player1 + + + + + + + + + 352 + 410 + 0,00 + 160 + 160 + + + Visible + + + + + 15 + 40 + + + + + PointsBarBG + + 768 + 180 + 0,00 + 160 + 220 + + + 1,00 + 0,00 + 0,00 + 0,75 + + + + + + + PointsBar + + 768 + 180 + 0,00 + 160 + 0 + + + Player2 + + + + + + + + + 768 + 410 + 0,00 + 160 + 160 + + + Visible + + + + + 15 + 40 + + + + + PointsBarBG + + 352 + 180 + 0,00 + 160 + 220 + + + 0,00 + 0,00 + 1,00 + 0,75 + + + + + + + PointsBar + + 352 + 180 + 0,00 + 160 + 0 + + + Player1 + + + + + + + + + 352 + 410 + 0,00 + 160 + 160 + + + Visible + + + + + 15 + 40 + + + + + PointsBarBG + + 768 + 180 + 0,00 + 160 + 220 + + + 1,00 + 0,00 + 0,00 + 0,75 + + + + + + + PointsBar + + 768 + 180 + 0,00 + 160 + 0 + + + Player4 + + + + + + + + + 768 + 410 + 0,00 + 160 + 160 + + + Visible + + + + + 15 + 40 + + + + + PointsBarBG + + 768 + 180 + 0,00 + 160 + 220 + + + 1,00 + 0,00 + 0,00 + 0,75 + + + + + + + PointsBar + + 768 + 180 + 0,00 + 160 + 0 + + + Player5 + + + + + + + + + 768 + 410 + 0,00 + 160 + 160 + + + Visible + + + + + 15 + 40 + + + + + PointsBarBG + + 768 + 180 + 0,00 + 160 + 220 + + + 1,00 + 0,00 + 0,00 + 0,75 + + + + + + + PointsBar + + 768 + 180 + 0,00 + 160 + 0 + + + Player6 + + + + + + + + + 768 + 410 + 0,00 + 160 + 160 + + + Visible + + + + + 15 + 40 + + 60 @@ -1080,5 +1905,1629 @@ + + + 270 + 630 + + 0,00 + + 44 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 270 + 140 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 270 + 105 + + 0,00 + + 32 + + 160 + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 270 + 670 + + 0,00 + + 28 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 502 + 630 + + 0,00 + + 44 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 502 + 140 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 502 + 105 + + 0,00 + + 32 + + 160 + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 502 + 670 + + 0,00 + + 28 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 734 + 630 + + 0,00 + + 44 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 734 + 140 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 734 + 105 + + 0,00 + + 32 + + 160 + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 734 + 670 + + 0,00 + + 28 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 966 + 630 + + 0,00 + + 44 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 966 + 140 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 966 + 105 + + 0,00 + + 32 + + 160 + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 966 + 670 + + 0,00 + + 28 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 318 + 630 + + 0,00 + + 44 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 318 + 140 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 318 + 105 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 318 + 670 + + 0,00 + + 28 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 640 + 630 + + 0,00 + + 44 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 640 + 140 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 640 + 105 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 640 + 670 + + 0,00 + + 28 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 630 + + 0,00 + + 44 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 140 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 105 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 670 + + 0,00 + + 28 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 630 + + 0,00 + + 44 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 140 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 105 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 670 + + 0,00 + + 28 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 630 + + 0,00 + + 44 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 140 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 105 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 670 + + 0,00 + + 28 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 318 + 630 + + 0,00 + + 44 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 318 + 140 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 318 + 105 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 318 + 670 + + 0,00 + + 28 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 640 + 630 + + 0,00 + + 44 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 640 + 140 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 640 + 105 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 640 + 670 + + 0,00 + + 28 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 630 + + 0,00 + + 44 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 140 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 105 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 670 + + 0,00 + + 28 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 630 + + 0,00 + + 44 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 140 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 105 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 670 + + 0,00 + + 28 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 630 + + 0,00 + + 44 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 140 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 105 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 670 + + 0,00 + + 28 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 630 + + 0,00 + + 44 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 140 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 105 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + + + + 962 + 670 + + 0,00 + + 28 + + + + StaticColor + + + TextSColor + + Center + + + + Outline + + + + + + - \ No newline at end of file + diff --git a/Output/Themes/Ambient/Screens/ScreenSing.xml b/Output/Themes/Ambient/Screens/ScreenSing.xml index 5c85960a..1c4c98c0 100644 --- a/Output/Themes/Ambient/Screens/ScreenSing.xml +++ b/Output/Themes/Ambient/Screens/ScreenSing.xml @@ -1,7 +1,7 @@  - 3 + 4 None @@ -328,6 +328,246 @@ + + + Score + + 528 + 150 + -0,75 + 100 + 50 + + + StaticColor + + + + + + + Score + + 528 + 350 + -0,75 + 100 + 50 + + + StaticColor + + + + + + + Score + + 1150 + 150 + -0,75 + 100 + 50 + + + StaticColor + + + + + + + Score + + 1150 + 350 + -0,75 + 100 + 50 + + + StaticColor + + + + + + + Score + + 528 + 10 + -0,75 + 100 + 50 + + + StaticColor + + + + + + + Score + + 528 + 210 + -0,75 + 100 + 50 + + + StaticColor + + + + + + + Score + + 528 + 410 + -0,75 + 100 + 50 + + + StaticColor + + + + + + + Score + + 1150 + 150 + -0,75 + 100 + 50 + + + StaticColor + + + + + + + Score + + 1150 + 350 + -0,75 + 100 + 50 + + + StaticColor + + + + + + + Score + + 528 + 10 + -0,75 + 100 + 50 + + + StaticColor + + + + + + + Score + + 528 + 210 + -0,75 + 100 + 50 + + + StaticColor + + + + + + + Score + + 528 + 410 + -0,75 + 100 + 50 + + + StaticColor + + + + + + + Score + + 1150 + 10 + -0,75 + 100 + 50 + + + StaticColor + + + + + + + Score + + 1150 + 210 + -0,75 + 100 + 50 + + + StaticColor + + + + + + + Score + + 1150 + 410 + -0,75 + 100 + 50 + + + StaticColor + + + + 640 @@ -572,6 +812,411 @@ + + + 578 + 155 + + -1,00 + + 40 + + + + Player1 + + + Player1 + + Center + + + + Normal + + + + + + + + + 578 + 355 + + -1,00 + + 40 + + + + Player2 + + + Player2 + + Center + + + + Normal + + + + + + + + + 1200 + 155 + + -1,00 + + 40 + + + + Player3 + + + Player3 + + Center + + + + Normal + + + + + + + + + 1200 + 355 + + -1,00 + + 40 + + + + Player4 + + + Player4 + + Center + + + + Normal + + + + + + + + + 578 + 15 + + -1,00 + + 40 + + + + Player1 + + + Player1 + + Center + + + + Normal + + + + + + + + + 578 + 215 + + -1,00 + + 40 + + + + Player2 + + + Player2 + + Center + + + + Normal + + + + + + + + + 578 + 415 + + -1,00 + + 40 + + + + Player3 + + + Player3 + + Center + + + + Normal + + + + + + + + + 1200 + 155 + + -1,00 + + 40 + + + + Player4 + + + Player4 + + Center + + + + Normal + + + + + + + + + 1200 + 355 + + -1,00 + + 40 + + + + Player5 + + + Player5 + + Center + + + + Normal + + + + + + + + + 578 + 15 + + -1,00 + + 40 + + + + Player1 + + + Player1 + + Center + + + + Normal + + + + + + + + + 578 + 215 + + -1,00 + + 40 + + + + Player2 + + + Player2 + + Center + + + + Normal + + + + + + + + + 578 + 415 + + -1,00 + + 40 + + + + Player3 + + + Player3 + + Center + + + + Normal + + + + + + + + + 1200 + 15 + + -1,00 + + 40 + + + + Player3 + + + Player4 + + Center + + + + Normal + + + + + + + + + 1200 + 215 + + -1,00 + + 40 + + + + Player5 + + + Player5 + + Center + + + + Normal + + + + + + + + + 1200 + 415 + + -1,00 + + 40 + + + + Player6 + + + Player6 + + Center + + + + Normal + + + + + + Button @@ -819,7 +1464,82 @@ -0,50 1210 150 + 35 + 150 + -0,50 + 578 + 175 + 35 + 350 + -0,50 + 578 + 175 + 678 + 150 + -0,50 + 578 + 175 + 678 + 350 + -0,50 + 578 + 175 + 35 + 10 + -0,50 + 578 + 150 + 35 + 210 + -0,50 + 578 + 150 + 35 + 410 + -0,50 + 578 + 150 + 678 + 150 + -0,50 + 578 + 175 + 678 + 350 + -0,50 + 578 + 175 + 35 + 10 + -0,50 + 578 + 150 + 35 + 210 + -0,50 + 578 + 150 + 35 + 410 + -0,50 + 578 + 150 + 678 + 10 + -0,50 + 578 + 150 + 678 + 210 + -0,50 + 578 + 150 + 678 + 410 + -0,50 + 578 + 150 - \ No newline at end of file + diff --git a/Output/Themes/Ambient/Skin Blue.xml b/Output/Themes/Ambient/Skin Blue.xml index 62fefa5d..0e74cee0 100644 --- a/Output/Themes/Ambient/Skin Blue.xml +++ b/Output/Themes/Ambient/Skin Blue.xml @@ -214,13 +214,13 @@ 0,300 1,000 - - 0,800 + + 0,800 0,950 1,000 0,500 - - + + 0,800 0,950 1,000 diff --git a/Output/Themes/Ambient/Skin Green.xml b/Output/Themes/Ambient/Skin Green.xml index 9d6047ae..f09b623f 100644 --- a/Output/Themes/Ambient/Skin Green.xml +++ b/Output/Themes/Ambient/Skin Green.xml @@ -214,13 +214,13 @@ 0,300 1,000 - - 0,800 + + 0,800 0,950 1,000 0,500 - - + + 0,800 0,950 1,000 diff --git a/Output/Themes/Ambient/Skin Red.xml b/Output/Themes/Ambient/Skin Red.xml index b74a054b..1ab926eb 100644 --- a/Output/Themes/Ambient/Skin Red.xml +++ b/Output/Themes/Ambient/Skin Red.xml @@ -214,13 +214,13 @@ 0,300 1,000 - - 0,800 + + 0,800 0,950 1,000 0,500 - - + + 0,800 0,950 1,000 diff --git a/Output/Themes/Ambient/Skin Yellow.xml b/Output/Themes/Ambient/Skin Yellow.xml index 5d63b033..8871e722 100644 --- a/Output/Themes/Ambient/Skin Yellow.xml +++ b/Output/Themes/Ambient/Skin Yellow.xml @@ -214,13 +214,13 @@ 0,300 1,000 - - 0,800 + + 0,800 0,950 1,000 0,500 - - + + 0,800 0,950 1,000 diff --git a/Output/Themes/Changelog/Changelog_ScreenNames.txt b/Output/Themes/Changelog/Changelog_ScreenNames.txt new file mode 100644 index 00000000..8db4f34f --- /dev/null +++ b/Output/Themes/Changelog/Changelog_ScreenNames.txt @@ -0,0 +1,16 @@ +SceenNames + +++++++++++ +Version 2: + +Add: + + +A new Theme-element for name-selecting. + + (One Static for eacht player): Static wich shows the selected player and is used as drop-area + (One Text for each player): Text wich shows name of selected player + + +Remove: +, , , , , \ No newline at end of file diff --git a/Output/Themes/Changelog/Changelog_ScreenScore.txt b/Output/Themes/Changelog/Changelog_ScreenScore.txt new file mode 100644 index 00000000..d050d838 --- /dev/null +++ b/Output/Themes/Changelog/Changelog_ScreenScore.txt @@ -0,0 +1,7 @@ +ScreenScore + +++++++++++ +Version 2: + +Add: Elements for up to 6 players! (Texts and statics!) +++++++++++ \ No newline at end of file diff --git a/Output/Themes/Changelog/Changelog_ScreenSing.txt b/Output/Themes/Changelog/Changelog_ScreenSing.txt index a1ea71f3..467cd165 100644 --- a/Output/Themes/Changelog/Changelog_ScreenSing.txt +++ b/Output/Themes/Changelog/Changelog_ScreenSing.txt @@ -1,5 +1,10 @@ ScreenSing +++++++++++ +Version 4: +Added Elements for 6-player-singing! + + ++++++++++ Version 3: diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index 02ad6565..f8280487 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -400,6 +400,8 @@ namespace Vocaluxe.Base #endregion Record + NumPlayer = 6; + return true; } else return false; diff --git a/Vocaluxe/Base/CSettings.cs b/Vocaluxe/Base/CSettings.cs index 8446d7fa..69be5d2d 100644 --- a/Vocaluxe/Base/CSettings.cs +++ b/Vocaluxe/Base/CSettings.cs @@ -103,7 +103,7 @@ namespace Vocaluxe.Base public static int MouseMoveDiffMin = 2; public const float MouseMoveOffTime = 3f; - public const int MaxNumPlayer = 3; + public const int MaxNumPlayer = 6; public const int MaxScore = 10000; public const int LinebonusScore = 1000; public const int MinScoreForDB = 100; diff --git a/Vocaluxe/Menu/CInteraction.cs b/Vocaluxe/Menu/CInteraction.cs index 87cae837..5e21fdd9 100644 --- a/Vocaluxe/Menu/CInteraction.cs +++ b/Vocaluxe/Menu/CInteraction.cs @@ -13,7 +13,8 @@ namespace Vocaluxe.Menu TStatic, TSongMenu, TLyric, - TSingNote + TSingNote, + TNameSelection } class CInteraction diff --git a/Vocaluxe/Menu/CMenu.cs b/Vocaluxe/Menu/CMenu.cs index 282fb865..8effd14a 100644 --- a/Vocaluxe/Menu/CMenu.cs +++ b/Vocaluxe/Menu/CMenu.cs @@ -29,6 +29,7 @@ namespace Vocaluxe.Menu private List _SongMenus; private List _Lyrics; private List _SingNotes; + private List _NameSelections; private Hashtable _htBackgrounds; private Hashtable _htStatics; @@ -38,6 +39,7 @@ namespace Vocaluxe.Menu private Hashtable _htLyrics; private Hashtable _htSelectSlides; private Hashtable _htSingNotes; + private Hashtable _htNameSelections; private int _PrevMouseX; @@ -58,6 +60,7 @@ namespace Vocaluxe.Menu protected string[] _ThemeLyrics; protected string[] _ThemeSelectSlides; protected string[] _ThemeSingNotes; + protected string[] _ThemeNameSelections; public int ThemeScreenVersion { @@ -82,6 +85,7 @@ namespace Vocaluxe.Menu _SongMenus = new List(); _Lyrics = new List(); _SingNotes = new List(); + _NameSelections = new List(); _htBackgrounds = new Hashtable(); _htStatics = new Hashtable(); @@ -91,6 +95,7 @@ namespace Vocaluxe.Menu _htLyrics = new Hashtable(); _htSelectSlides = new Hashtable(); _htSingNotes = new Hashtable(); + _htNameSelections = new Hashtable(); _PrevMouseX = 0; _PrevMouseY = 0; @@ -109,6 +114,7 @@ namespace Vocaluxe.Menu _ThemeLyrics = null; _ThemeSelectSlides = null; _ThemeSingNotes = null; + _ThemeNameSelections = null; } #region ThemeHandler @@ -275,6 +281,22 @@ namespace Vocaluxe.Menu } } } + + if (_ThemeNameSelections != null) + { + for (int i = 0; i < _ThemeNameSelections.Length; i++) + { + CNameSelection nsel = new CNameSelection(); + if (nsel.LoadTheme("//root/" + _ThemeName, _ThemeNameSelections[i], navigator, SkinIndex)) + { + _htNameSelections.Add(_ThemeNameSelections[i], AddNameSelection(nsel)); + } + else + { + CLog.LogError("Can't load NameSelection \"" + _ThemeNameSelections[i] + "\" in screen " + _ThemeName); + } + } + } } else { @@ -344,6 +366,12 @@ namespace Vocaluxe.Menu _SingNotes[i].SaveTheme(writer); } + // NameSelections + for (int i = 0; i < _NameSelections.Count; i++) + { + _NameSelections[i].SaveTheme(writer); + } + writer.WriteEndElement(); // End of File @@ -395,6 +423,11 @@ namespace Vocaluxe.Menu { sn.ReloadTextures(); } + + foreach (CNameSelection ns in _NameSelections) + { + ns.ReloadTextures(); + } } public virtual void UnloadTextures() @@ -438,6 +471,13 @@ namespace Vocaluxe.Menu { sn.UnloadTextures(); } + + foreach (CNameSelection ns in _NameSelections) + { + ns.UnloadTextures(); + } + + } public virtual void ReloadTheme() @@ -488,6 +528,11 @@ namespace Vocaluxe.Menu { return _SingNotes; } + + public List GetNameSelections() + { + return _NameSelections; + } #endregion GetLists #region ElementHandler @@ -555,6 +600,14 @@ namespace Vocaluxe.Menu return _SingNotes.ToArray(); } } + + public CNameSelection[] NameSelections + { + get + { + return _NameSelections.ToArray(); + } + } #endregion Get Arrays #region Hashtables @@ -661,6 +714,19 @@ namespace Vocaluxe.Menu throw; } } + + public int htNameSelections(string key) + { + try + { + return (int)_htNameSelections[key]; + } + catch (Exception) + { + CLog.LogError("Can't find NameSelection Element \"" + key + "\" in Screen " + _ThemeName); + throw; + } + } #endregion Hashtables #endregion ElementHandler @@ -922,6 +988,9 @@ namespace Vocaluxe.Menu foreach (CText text in _Texts) text.Draw(); + + foreach (CNameSelection namesel in _NameSelections) + namesel.Draw(); } #endregion Drawing @@ -981,6 +1050,13 @@ namespace Vocaluxe.Menu AddInteraction(_SingNotes.Count - 1, EType.TSingNote); return _SingNotes.Count - 1; } + + public int AddNameSelection(CNameSelection ns) + { + _NameSelections.Add(ns); + AddInteraction(_NameSelections.Count - 1, EType.TNameSelection); + return _NameSelections.Count - 1; + } #endregion Elements #region InteractionHandling @@ -1459,6 +1535,9 @@ namespace Vocaluxe.Menu case EType.TLyric: _Lyrics[_Interactions[_Selection].Num].Selected = true; break; + case EType.TNameSelection: + _NameSelections[_Interactions[_Selection].Num].Selected = true; + break; } } @@ -1484,6 +1563,9 @@ namespace Vocaluxe.Menu case EType.TLyric: _Lyrics[_Interactions[_Selection].Num].Selected = false; break; + case EType.TNameSelection: + _NameSelections[_Interactions[_Selection].Num].Selected = false; + break; } } @@ -1512,6 +1594,9 @@ namespace Vocaluxe.Menu case EType.TLyric: //_Lyrics[_Interactions[selection].Num].Selected = true; break; + case EType.TNameSelection: + //_NameSelections[_Interactions[selection].Num].Selected = true; + break; } } @@ -1540,6 +1625,9 @@ namespace Vocaluxe.Menu case EType.TLyric: //_Lyrics[_Interactions[selection].Num].Selected = false; break; + case EType.TNameSelection: + //_NameSelections[_Interactions[selection].Num].Selected = false; + break; } } @@ -1587,6 +1675,9 @@ namespace Vocaluxe.Menu case EType.TLyric: return _Lyrics[_Interactions[interaction].Num].Visible; + + case EType.TNameSelection: + return _NameSelections[_Interactions[interaction].Num].Visible; } return Result; @@ -1614,6 +1705,9 @@ namespace Vocaluxe.Menu case EType.TLyric: return _Lyrics[_Interactions[interaction].Num].Rect; + + case EType.TNameSelection: + return _NameSelections[_Interactions[interaction].Num].Rect; } return Result; @@ -1660,6 +1754,10 @@ namespace Vocaluxe.Menu case EType.TLyric: _Lyrics[_Interactions[_Selection].Num].MoveElement(stepX, stepY); break; + + case EType.TNameSelection: + _NameSelections[_Interactions[_Selection].Num].MoveElement(stepX, stepY); + break; } } } @@ -1693,6 +1791,10 @@ namespace Vocaluxe.Menu case EType.TLyric: _Lyrics[_Interactions[_Selection].Num].ResizeElement(stepW, stepH); break; + + case EType.TNameSelection: + _NameSelections[_Interactions[_Selection].Num].ResizeElement(stepW, stepH); + break; } } } diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index fb209c32..083cddf1 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -12,14 +12,24 @@ namespace Vocaluxe.Screens class CScreenNames : CMenu { // Version number for theme files. Increment it, if you've changed something on the theme files! - const int ScreenVersion = 1; + const int ScreenVersion = 2; - private readonly string[] SelectSlidePlayerMic = new string[] { "SelectSlidePlayerMic1", "SelectSlidePlayerMic2", "SelectSlidePlayerMic3" }; - private readonly string[] ButtonPlayer = new string[] { "Button1Player", "Button2Player", "Button3Player" }; + private CStatic chooseAvatarStatic; + private int OldMouseX; + private int OldMouseY; + + private const string SelectSlidePlayerNumber = "SelectSlidePlayerNumber"; + private const string NameSelection = "NameSelection"; private const string ButtonBack = "ButtonBack"; private const string ButtonStart = "ButtonStart"; private const string TextWarning = "TextWarning"; private const string StaticWarning = "StaticWarning"; + private readonly string[] StaticPlayer = new string[] {"StaticPlayer1", "StaticPlayer2", "StaticPlayer3", "StaticPlayer4", "StaticPlayer5", "StaticPlayer6"}; + private readonly string[] TextPlayer = new string[] { "TextPlayer1", "TextPlayer2", "TextPlayer3", "TextPlayer4", "TextPlayer5", "TextPlayer6" }; + + private bool selectingMouseActive = false; + private int SelectedPlayerNr; + private int[] _PlayerNr; @@ -36,38 +46,40 @@ namespace Vocaluxe.Screens _ScreenVersion = ScreenVersion; List statics = new List(); + foreach(string text in StaticPlayer){ + statics.Add(text); + } statics.Add(StaticWarning); _ThemeStatics = statics.ToArray(); List texts = new List(); - foreach (string text in SelectSlidePlayerMic) - { - texts.Add(text); - } - _ThemeSelectSlides = texts.ToArray(); + + _ThemeSelectSlides = new string[] { SelectSlidePlayerNumber }; texts.Clear(); texts.Add(TextWarning); + foreach(string text in TextPlayer){ + texts.Add(text); + } _ThemeTexts = texts.ToArray(); texts.Clear(); texts.Add(ButtonBack); texts.Add(ButtonStart); - foreach (string text in ButtonPlayer) - { - texts.Add(text); - } + _ThemeButtons = texts.ToArray(); + + texts.Clear(); + texts.Add(NameSelection); + _ThemeNameSelections = texts.ToArray(); + + chooseAvatarStatic = new CStatic(); + chooseAvatarStatic.Visible = false; } public override void LoadTheme() { base.LoadTheme(); - - for (int i = 0; i < SelectSlidePlayerMic.Length; i++) - { - SelectSlides[htSelectSlides(SelectSlidePlayerMic[i])].WithTextures = true; - } _PlayerNr = new int[CSettings.MaxNumPlayer]; for (int i = 0; i < _PlayerNr.Length; i++) @@ -95,25 +107,6 @@ namespace Vocaluxe.Screens break; case Keys.Enter: - - for (int i = 0; i < ButtonPlayer.Length; i++) - { - if (Buttons[htButtons(ButtonPlayer[i])].Selected) - { - processed = true; - CGame.NumPlayer = i + 1; - - UpdateSelection(); - UpdateVisibility(); - - CConfig.NumPlayer = CGame.NumPlayer; - CConfig.SaveConfig(); - - CheckMics(); - - break; - } - } if (!processed && Buttons[htButtons(ButtonBack)].Selected) { @@ -141,6 +134,75 @@ namespace Vocaluxe.Screens { base.HandleMouse(MouseEvent); + //Check if LeftButton is hold and Select-Mode inactive + if (MouseEvent.LBH && !selectingMouseActive) + { + //Save mouse-coords + OldMouseX = MouseEvent.X; + OldMouseY = MouseEvent.Y; + //Check if mouse if over tile + if (NameSelections[htNameSelections(NameSelection)].isOverTile(OldMouseX, OldMouseY)) + { + //Get player-number of tile + SelectedPlayerNr = NameSelections[htNameSelections(NameSelection)].TilePlayerNr(OldMouseX, OldMouseY); + if (SelectedPlayerNr != -1) + { + //Activate mouse-selecting + selectingMouseActive = true; + + //Update of Drag/Drop-Texture + CStatic SelectedPlayer = NameSelections[htNameSelections(NameSelection)].TilePlayerAvatar(OldMouseX, OldMouseY); + chooseAvatarStatic.Visible = true; + chooseAvatarStatic.Rect = SelectedPlayer.Rect; + chooseAvatarStatic.Rect.Z = CSettings.zNear - 5; + chooseAvatarStatic.Color = new SColorF(1, 1, 1, 1); + chooseAvatarStatic.Texture = SelectedPlayer.Texture; + } + } + } + + //Check if LeftButton is hold and Select-Mode active + if (MouseEvent.LBH && selectingMouseActive) + { + //Update coords for Drag/Drop-Texture + chooseAvatarStatic.Rect.X += (MouseEvent.X - OldMouseX); + chooseAvatarStatic.Rect.Y += (MouseEvent.Y - OldMouseY); + OldMouseX = MouseEvent.X; + OldMouseY = MouseEvent.Y; + } + // LeftButton isn't hold anymore, but Selec-Mode is still active -> "Drop" of Avatar + else if (selectingMouseActive) + { + //Check if really a player was selected + if (SelectedPlayerNr != -1) + { + //Foreach Drop-Area + for (int i = 0; i < StaticPlayer.Length; i++) + { + //Check first, if area is "active" + if (Statics[htStatics(StaticPlayer[i])].Visible == true) + { + //Check if Mouse is in area + if (Statics[htStatics(StaticPlayer[i])].Rect.X < MouseEvent.X && (Statics[htStatics(StaticPlayer[i])].Rect.X + Statics[htStatics(StaticPlayer[i])].Rect.W) > MouseEvent.X + && Statics[htStatics(StaticPlayer[i])].Rect.Y < MouseEvent.Y && (Statics[htStatics(StaticPlayer[i])].Rect.Y + Statics[htStatics(StaticPlayer[i])].Rect.H) > MouseEvent.Y) + { + //Update Game-infos with new player + CGame.Player[i].Name = CProfiles.Profiles[SelectedPlayerNr].PlayerName; + CGame.Player[i].Difficulty = CProfiles.Profiles[SelectedPlayerNr].Difficulty; + CGame.Player[i].ProfileID = SelectedPlayerNr; + //Update texture and name + Statics[htStatics(StaticPlayer[i])].Texture = chooseAvatarStatic.Texture; + Texts[htTexts(TextPlayer[i])].Text = CProfiles.Profiles[SelectedPlayerNr].PlayerName; + } + } + } + SelectedPlayerNr = -1; + } + //Reset variables + selectingMouseActive = false; + chooseAvatarStatic.Visible = false; + } + if (MouseEvent.LB && IsMouseOver(MouseEvent)) { @@ -149,24 +211,6 @@ namespace Vocaluxe.Screens if (MouseEvent.LB && IsMouseOver(MouseEvent)) { bool processed = false; - for (int i = 0; i < ButtonPlayer.Length; i++) - { - if (Buttons[htButtons(ButtonPlayer[i])].Selected) - { - processed = true; - CGame.NumPlayer = i + 1; - - UpdateSelection(); - UpdateVisibility(); - - CConfig.NumPlayer = CGame.NumPlayer; - CConfig.SaveConfig(); - - CheckMics(); - - break; - } - } if (!processed && Buttons[htButtons(ButtonBack)].Selected) { @@ -182,6 +226,7 @@ namespace Vocaluxe.Screens if (!processed) UpdateSelection(); + UpdatePlayerNumber(); } if (MouseEvent.RB) @@ -201,6 +246,8 @@ namespace Vocaluxe.Screens { base.OnShow(); + NameSelections[htNameSelections(NameSelection)].Init(); + UpdateSlides(); UpdateVisibility(); CheckMics(); @@ -208,26 +255,34 @@ namespace Vocaluxe.Screens public override bool Draw() { - return base.Draw(); + base.Draw(); + + if (chooseAvatarStatic.Visible) + { + chooseAvatarStatic.Draw(); + } + + return true; } private void StartSong() { for (int i = 0; i < CGame.NumPlayer; i++) { - if (CProfiles.Profiles.Length > 0) - { - int pIndex = SelectSlides[htSelectSlides(SelectSlidePlayerMic[i])].ValueIndex; - CGame.Player[i].Name = CProfiles.Profiles[pIndex].PlayerName; - CGame.Player[i].Difficulty = CProfiles.Profiles[pIndex].Difficulty; - CGame.Player[i].ProfileID = pIndex; - } - else + if (CGame.Player[i].ProfileID < 0) { CGame.Player[i].Name = "Player " + i.ToString(); CGame.Player[i].Difficulty = EGameDifficulty.TR_CONFIG_EASY; CGame.Player[i].ProfileID = -1; } + else + { + //Just a work-around for not crashing the game + if (CGame.Player[i].Name == null) + { + CGame.Player[i].Name = ""; + } + } } CGraphics.FadeTo(EScreens.ScreenSing); @@ -235,51 +290,50 @@ namespace Vocaluxe.Screens private void UpdateSlides() { - for (int i = 0; i < SelectSlidePlayerMic.Length; i++) + SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Clear(); + for (int i = 1; i <= CSettings.MaxNumPlayer; i++) { - SelectSlides[htSelectSlides(SelectSlidePlayerMic[i])].Clear(); - } - - for (int i = 0; i < CProfiles.NumProfiles; i++) - { - if (CProfiles.Profiles[i].Active == EOffOn.TR_CONFIG_ON) - { - for (int p = 0; p < SelectSlidePlayerMic.Length; p++) - { - SelectSlides[htSelectSlides(SelectSlidePlayerMic[p])].AddValue(CProfiles.Profiles[i].PlayerName, CProfiles.Profiles[i].Avatar.Texture, i); - } - } - } - - for (int i = 0; i < _PlayerNr.Length; i++) - { - if (i < SelectSlidePlayerMic.Length) - { - if (_PlayerNr[i] < CProfiles.NumProfiles && _PlayerNr[i] >= 0) - { - SelectSlides[htSelectSlides(SelectSlidePlayerMic[i])].Selection = _PlayerNr[i]; - } - } + SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].AddValue(CLanguage.Translate("TR_SCREENNAMES_" + i + "PLAYER")); } + SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection = CConfig.NumPlayer - 1; } private void UpdateSelection() { for (int i = 0; i < _PlayerNr.Length; i++) { - if (i < SelectSlidePlayerMic.Length) + + } + } + + private void UpdatePlayerNumber() + { + if (CConfig.NumPlayer != (int)SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection + 1) + { + CConfig.NumPlayer = (int)SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection + 1; + CGame.NumPlayer = (int)SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection + 1; + for (int i = 1; i <= CSettings.MaxNumPlayer; i++) { - _PlayerNr[i] = SelectSlides[htSelectSlides(SelectSlidePlayerMic[i])].Selection; + if (i <= CGame.NumPlayer) + { + Statics[htStatics("StaticPlayer" + i)].Visible = true; + Texts[htTexts("TextPlayer" + i)].Visible = true; + } + else + { + Statics[htStatics("StaticPlayer" + i)].Visible = false; + Texts[htTexts("TextPlayer" + i)].Visible = false; + } } + CConfig.SaveConfig(); + CheckMics(); + } } private void UpdateVisibility() { - for (int i = 0; i < SelectSlidePlayerMic.Length; i++) - { - SelectSlides[htSelectSlides(SelectSlidePlayerMic[i])].Visible = i < CGame.NumPlayer; - } + } private void CheckMics() diff --git a/Vocaluxe/Screens/CScreenScore.cs b/Vocaluxe/Screens/CScreenScore.cs index bb6287c5..eb7bf9b8 100644 --- a/Vocaluxe/Screens/CScreenScore.cs +++ b/Vocaluxe/Screens/CScreenScore.cs @@ -15,7 +15,7 @@ namespace Vocaluxe.Screens class CScreenScore : CMenu { // Version number for theme files. Increment it, if you've changed something on the theme files! - const int ScreenVersion = 1; + const int ScreenVersion = 2; private const string TextSong = "TextSong"; diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index 415a7bd9..fc90a9d5 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -17,7 +17,7 @@ namespace Vocaluxe.Screens class CScreenSing : CMenu { // Version number for theme files. Increment it, if you've changed something on the theme files! - const int ScreenVersion = 3; + const int ScreenVersion = 4; struct TimeRect { diff --git a/Vocaluxe/Vocaluxe.csproj b/Vocaluxe/Vocaluxe.csproj index 0c3b8104..6dc4fbe4 100644 --- a/Vocaluxe/Vocaluxe.csproj +++ b/Vocaluxe/Vocaluxe.csproj @@ -165,6 +165,7 @@ + From 86cfdab4ada3b4458b12ff3eedbc71f0e295fd38 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Sat, 31 Mar 2012 10:25:13 +0200 Subject: [PATCH 03/42] Forget to remove setting test-value... --- Vocaluxe/Base/CConfig.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index f8280487..02ad6565 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -400,8 +400,6 @@ namespace Vocaluxe.Base #endregion Record - NumPlayer = 6; - return true; } else return false; From ea6471ad800acdb87b5f7e7e357e51d0625e3551 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Sat, 31 Mar 2012 10:59:53 +0200 Subject: [PATCH 04/42] Fix: Right number of drop-areas OnShow... --- Vocaluxe/Screens/CScreenNames.cs | 37 ++++++++++++++------------------ 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index 083cddf1..f61fc9f8 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -124,7 +124,7 @@ namespace Vocaluxe.Screens } if (!processed) - UpdateSelection(); + UpdatePlayerNumber(); } return true; @@ -225,8 +225,7 @@ namespace Vocaluxe.Screens } if (!processed) - UpdateSelection(); - UpdatePlayerNumber(); + UpdatePlayerNumber(); } if (MouseEvent.RB) @@ -249,7 +248,7 @@ namespace Vocaluxe.Screens NameSelections[htNameSelections(NameSelection)].Init(); UpdateSlides(); - UpdateVisibility(); + UpdatePlayerNumber(); CheckMics(); } @@ -308,27 +307,23 @@ namespace Vocaluxe.Screens private void UpdatePlayerNumber() { - if (CConfig.NumPlayer != (int)SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection + 1) + CConfig.NumPlayer = (int)SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection + 1; + CGame.NumPlayer = (int)SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection + 1; + for (int i = 1; i <= CSettings.MaxNumPlayer; i++) { - CConfig.NumPlayer = (int)SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection + 1; - CGame.NumPlayer = (int)SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection + 1; - for (int i = 1; i <= CSettings.MaxNumPlayer; i++) + if (i <= CGame.NumPlayer) { - if (i <= CGame.NumPlayer) - { - Statics[htStatics("StaticPlayer" + i)].Visible = true; - Texts[htTexts("TextPlayer" + i)].Visible = true; - } - else - { - Statics[htStatics("StaticPlayer" + i)].Visible = false; - Texts[htTexts("TextPlayer" + i)].Visible = false; - } + Statics[htStatics("StaticPlayer" + i)].Visible = true; + Texts[htTexts("TextPlayer" + i)].Visible = true; + } + else + { + Statics[htStatics("StaticPlayer" + i)].Visible = false; + Texts[htTexts("TextPlayer" + i)].Visible = false; } - CConfig.SaveConfig(); - CheckMics(); - } + CConfig.SaveConfig(); + CheckMics(); } private void UpdateVisibility() From 4affefa133286d5456c2e3886aaf278e6f0d1ee5 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Sat, 31 Mar 2012 11:03:23 +0200 Subject: [PATCH 05/42] Finished 5-player on ScoreScreen. --- Output/Themes/Ambient/Screens/ScreenScore.xml | 100 +++++++++++------- 1 file changed, 60 insertions(+), 40 deletions(-) diff --git a/Output/Themes/Ambient/Screens/ScreenScore.xml b/Output/Themes/Ambient/Screens/ScreenScore.xml index cb3ec553..106770dc 100644 --- a/Output/Themes/Ambient/Screens/ScreenScore.xml +++ b/Output/Themes/Ambient/Screens/ScreenScore.xml @@ -602,7 +602,7 @@ PointsBarBG - 352 + 144 180 0,00 160 @@ -621,7 +621,7 @@ PointsBar - 352 + 144 180 0,00 160 @@ -637,7 +637,7 @@ - 352 + 144 410 0,00 160 @@ -657,7 +657,7 @@ PointsBarBG - 768 + 352 180 0,00 160 @@ -676,7 +676,7 @@ PointsBar - 768 + 352 180 0,00 160 @@ -692,7 +692,7 @@ - 768 + 352 410 0,00 160 @@ -712,7 +712,7 @@ PointsBarBG - 352 + 560 180 0,00 160 @@ -720,8 +720,8 @@ 0,00 - 0,00 - 1,00 + 1,00 + 0,00 0,75 @@ -731,14 +731,14 @@ PointsBar - 352 + 560 180 0,00 160 0 - Player1 + Player3 @@ -747,7 +747,7 @@ - 352 + 560 410 0,00 160 @@ -774,9 +774,9 @@ 220 - 1,00 + 0,50 0,00 - 0,00 + 1,00 0,75 @@ -822,16 +822,16 @@ PointsBarBG - 768 + 976 180 0,00 160 220 - 1,00 - 0,00 - 0,00 + 0,00 + 0,50 + 1,00 0,75 @@ -841,7 +841,7 @@ PointsBar - 768 + 976 180 0,00 160 @@ -857,7 +857,7 @@ - 768 + 976 410 0,00 160 @@ -2343,13 +2343,14 @@ - 318 + 224 630 0,00 44 + 160 StaticColor @@ -2370,13 +2371,14 @@ - 318 + 224 140 0,00 32 + 160 StaticColor @@ -2397,13 +2399,14 @@ - 318 + 224 105 0,00 32 + 160 StaticColor @@ -2424,13 +2427,14 @@ - 318 + 224 670 0,00 28 + 160 StaticColor @@ -2451,13 +2455,14 @@ - 640 + 432 630 0,00 44 + 160 StaticColor @@ -2478,13 +2483,14 @@ - 640 + 432 140 0,00 32 + 160 StaticColor @@ -2505,13 +2511,14 @@ - 640 + 432 105 0,00 32 + 160 StaticColor @@ -2532,13 +2539,14 @@ - 640 + 432 670 0,00 28 + 160 StaticColor @@ -2559,13 +2567,14 @@ - 962 + 640 630 0,00 44 + 160 StaticColor @@ -2586,13 +2595,14 @@ - 962 + 640 140 0,00 32 + 160 StaticColor @@ -2613,13 +2623,14 @@ - 962 + 640 105 0,00 32 + 160 StaticColor @@ -2640,13 +2651,14 @@ - 962 + 640 670 0,00 28 + 160 StaticColor @@ -2667,13 +2679,14 @@ - 962 + 848 630 0,00 44 + 160 StaticColor @@ -2694,13 +2707,14 @@ - 962 + 848 140 0,00 32 + 160 StaticColor @@ -2721,13 +2735,14 @@ - 962 + 848 105 0,00 32 + 160 StaticColor @@ -2748,13 +2763,14 @@ - 962 + 848 670 0,00 28 + 160 StaticColor @@ -2775,13 +2791,14 @@ - 962 + 1056 630 0,00 44 + 160 StaticColor @@ -2802,13 +2819,14 @@ - 962 + 1056 140 0,00 32 + 160 StaticColor @@ -2829,13 +2847,14 @@ - 962 + 1056 105 0,00 32 + 160 StaticColor @@ -2856,13 +2875,14 @@ - 962 + 1056 670 0,00 28 + 160 StaticColor From aba9c97988c74c015a14b758b282c49167f1ec7c Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Sat, 31 Mar 2012 12:36:37 +0200 Subject: [PATCH 06/42] Finished Score-Screen for 6 players. --- Output/Themes/Ambient/Screens/ScreenScore.xml | 126 +++++++++++------- 1 file changed, 75 insertions(+), 51 deletions(-) diff --git a/Output/Themes/Ambient/Screens/ScreenScore.xml b/Output/Themes/Ambient/Screens/ScreenScore.xml index 106770dc..539c8bf3 100644 --- a/Output/Themes/Ambient/Screens/ScreenScore.xml +++ b/Output/Themes/Ambient/Screens/ScreenScore.xml @@ -877,7 +877,7 @@ PointsBarBG - 352 + 45 180 0,00 160 @@ -896,7 +896,7 @@ PointsBar - 352 + 45 180 0,00 160 @@ -912,7 +912,7 @@ - 352 + 45 410 0,00 160 @@ -932,7 +932,7 @@ PointsBarBG - 768 + 253 180 0,00 160 @@ -951,7 +951,7 @@ PointsBar - 768 + 253 180 0,00 160 @@ -967,7 +967,7 @@ - 768 + 253 410 0,00 160 @@ -987,7 +987,7 @@ PointsBarBG - 352 + 461 180 0,00 160 @@ -995,8 +995,8 @@ 0,00 - 0,00 - 1,00 + 1,00 + 0,00 0,75 @@ -1006,14 +1006,14 @@ PointsBar - 352 + 461 180 0,00 160 0 - Player1 + Player3 @@ -1022,7 +1022,7 @@ - 352 + 461 410 0,00 160 @@ -1042,16 +1042,16 @@ PointsBarBG - 768 + 669 180 0,00 160 220 - 1,00 + 0,50 0,00 - 0,00 + 1,00 0,75 @@ -1061,7 +1061,7 @@ PointsBar - 768 + 669 180 0,00 160 @@ -1077,7 +1077,7 @@ - 768 + 669 410 0,00 160 @@ -1097,16 +1097,16 @@ PointsBarBG - 768 + 877 180 0,00 160 220 - 1,00 - 0,00 - 0,00 + 0,00 + 0,50 + 1,00 0,75 @@ -1116,7 +1116,7 @@ PointsBar - 768 + 877 180 0,00 160 @@ -1132,7 +1132,7 @@ - 768 + 877 410 0,00 160 @@ -1152,7 +1152,7 @@ PointsBarBG - 768 + 1085 180 0,00 160 @@ -1161,7 +1161,7 @@ 1,00 0,00 - 0,00 + 0,50 0,75 @@ -1171,7 +1171,7 @@ PointsBar - 768 + 1085 180 0,00 160 @@ -1187,7 +1187,7 @@ - 768 + 1085 410 0,00 160 @@ -2903,13 +2903,14 @@ - 318 + 125 630 0,00 44 + 160 StaticColor @@ -2930,13 +2931,14 @@ - 318 + 125 140 0,00 32 + 160 StaticColor @@ -2957,13 +2959,14 @@ - 318 + 125 105 0,00 32 + 160 StaticColor @@ -2984,13 +2987,14 @@ - 318 + 125 670 0,00 28 + 160 StaticColor @@ -3011,13 +3015,14 @@ - 640 + 333 630 0,00 44 + 160 StaticColor @@ -3038,13 +3043,14 @@ - 640 + 333 140 0,00 32 + 160 StaticColor @@ -3065,13 +3071,14 @@ - 640 + 333 105 0,00 32 + 160 StaticColor @@ -3092,13 +3099,14 @@ - 640 + 333 670 0,00 28 + 160 StaticColor @@ -3119,13 +3127,14 @@ - 962 + 541 630 0,00 44 + 160 StaticColor @@ -3146,13 +3155,14 @@ - 962 + 541 140 0,00 32 + 160 StaticColor @@ -3173,13 +3183,14 @@ - 962 + 541 105 0,00 32 + 160 StaticColor @@ -3200,13 +3211,14 @@ - 962 + 541 670 0,00 28 + 160 StaticColor @@ -3227,13 +3239,14 @@ - 962 + 749 630 0,00 44 + 160 StaticColor @@ -3254,13 +3267,14 @@ - 962 + 749 140 0,00 32 + 160 StaticColor @@ -3281,13 +3295,14 @@ - 962 + 749 105 0,00 32 + 160 StaticColor @@ -3308,13 +3323,14 @@ - 962 + 749 670 0,00 28 + 160 StaticColor @@ -3335,13 +3351,14 @@ - 962 + 957 630 0,00 44 + 160 StaticColor @@ -3362,13 +3379,14 @@ - 962 + 957 140 0,00 32 + 160 StaticColor @@ -3389,13 +3407,14 @@ - 962 + 957 105 0,00 32 + 160 StaticColor @@ -3416,13 +3435,14 @@ - 962 + 957 670 0,00 28 + 160 StaticColor @@ -3443,13 +3463,14 @@ - 962 + 1165 630 0,00 44 + 160 StaticColor @@ -3470,13 +3491,14 @@ - 962 + 1165 140 0,00 32 + 160 StaticColor @@ -3497,13 +3519,14 @@ - 962 + 1165 105 0,00 32 + 160 StaticColor @@ -3524,13 +3547,14 @@ - 962 + 1165 670 0,00 28 + 160 StaticColor From f5050028c64b994c5bc55db84260a8e23de7b2ce Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Sat, 31 Mar 2012 13:05:58 +0200 Subject: [PATCH 07/42] Added scrolling for offset. --- Vocaluxe/Menu/CNameSelection.cs | 380 +++++++++++++++++++++++++++++++ Vocaluxe/Screens/CScreenNames.cs | 15 +- 2 files changed, 392 insertions(+), 3 deletions(-) create mode 100644 Vocaluxe/Menu/CNameSelection.cs diff --git a/Vocaluxe/Menu/CNameSelection.cs b/Vocaluxe/Menu/CNameSelection.cs new file mode 100644 index 00000000..526969cf --- /dev/null +++ b/Vocaluxe/Menu/CNameSelection.cs @@ -0,0 +1,380 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Text; +using System.Xml; +using System.Xml.XPath; + +using Vocaluxe.Base; +using Vocaluxe.Lib.Draw; + +namespace Vocaluxe.Menu +{ + struct SThemeNameSelection + { + public string Name; + public string TextureSelectorName; + public string ColorSelectorName; + public string TextureEmptyTileName; + public string ColorEmptyTileName; + public float NameSpace; + public float NameHeight; + public string NameFont; + public EStyle NameStyle; + public SColorF NameColor; + public string NameColorName; + } + + class CNameSelection : IMenuElement + { + + class CTile + { + public int PlayerNr; + public CStatic Avatar; + public CText Name; + + public CTile() + { + } + + public CTile(CStatic av, CText tex, int pl) + { + Avatar = av; + Name = tex; + PlayerNr = pl; + } + } + + private SThemeNameSelection _Theme; + private bool _ThemeLoaded; + + public bool Selected = false; + public bool Visible = true; + + public SRectF Rect; + private List _Tiles; + + private STexture _TextureSelector; + private STexture _TextureEmptyTile; + + public SColorF ColorSelector; + public SColorF ColorEmptyTile; + + private int _NumW; + private int _NumH; + + private float _SpaceW; + private float _SpaceH; + + private int _TileW; + private int _TileH; + + public int _Offset = 0; + private int _actualSelection = -1; + + + public CNameSelection() + { + _Theme = new SThemeNameSelection(); + + _TextureSelector = CTheme.GetSkinTexture(_Theme.TextureSelectorName); + _TextureEmptyTile = CTheme.GetSkinTexture(_Theme.TextureEmptyTileName); + + _Tiles = new List(); + } + + public void Init() + { + _Tiles.Clear(); + for (int i = 0; i < _NumH; i++) + { + for (int j = 0; j < _NumW; j++) + { + SRectF rect = new SRectF(Rect.X + j * (_TileW + _SpaceW), Rect.Y + i * (_TileH + _SpaceH), _TileW, _TileH, Rect.Z); + CStatic tileStatic = new CStatic(_TextureEmptyTile, ColorEmptyTile, rect); + CText tileText = new CText(rect.X + rect.W / 2, rect.Y + rect.H + _Theme.NameSpace, rect.Z, _Theme.NameHeight, rect.W, EAlignment.Center, _Theme.NameStyle, _Theme.NameFont, _Theme.NameColor, "Name"); + _Tiles.Add(new CTile(tileStatic, tileText, -1)); + } + } + + UpdateList(0); + } + + public bool LoadTheme(string XmlPath, string ElementName, XPathNavigator navigator, int SkinIndex) + { + string item = XmlPath + "/" + ElementName; + _ThemeLoaded = true; + + _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/X", navigator, ref Rect.X); + _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Y", navigator, ref Rect.Y); + _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Z", navigator, ref Rect.Z); + _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/W", navigator, ref Rect.W); + _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/H", navigator, ref Rect.H); + + _ThemeLoaded &= CHelper.GetValueFromXML(item + "/SkinSelector", navigator, ref _Theme.TextureSelectorName, String.Empty); + + if (CHelper.GetValueFromXML(item + "/ColorSelector", navigator, ref _Theme.ColorSelectorName, String.Empty)) + { + _ThemeLoaded &= CTheme.GetColor(_Theme.ColorSelectorName, SkinIndex, ref ColorSelector); + } + else + { + _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/R", navigator, ref ColorSelector.R); + _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/G", navigator, ref ColorSelector.G); + _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/B", navigator, ref ColorSelector.B); + _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/A", navigator, ref ColorSelector.A); + } + + + _ThemeLoaded &= CHelper.GetValueFromXML(item + "/SkinEmptyTile", navigator, ref _Theme.TextureEmptyTileName, String.Empty); + + if (CHelper.GetValueFromXML(item + "/ColorEmptyTile", navigator, ref _Theme.ColorEmptyTileName, String.Empty)) + { + _ThemeLoaded &= CTheme.GetColor(_Theme.ColorEmptyTileName, SkinIndex, ref ColorEmptyTile); + } + else + { + _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/R", navigator, ref ColorEmptyTile.R); + _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/G", navigator, ref ColorEmptyTile.G); + _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/B", navigator, ref ColorEmptyTile.B); + _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/A", navigator, ref ColorEmptyTile.A); + } + + _ThemeLoaded &= CHelper.TryGetIntValueFromXML(item + "/Tiles/W", navigator, ref _TileW); + _ThemeLoaded &= CHelper.TryGetIntValueFromXML(item + "/Tiles/H", navigator, ref _TileH); + _ThemeLoaded &= CHelper.TryGetIntValueFromXML(item + "/Tiles/NumW", navigator, ref _NumW); + _ThemeLoaded &= CHelper.TryGetIntValueFromXML(item + "/Tiles/NumH", navigator, ref _NumH); + _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Tiles/SpaceW", navigator, ref _SpaceW); + _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Tiles/SpaceH", navigator, ref _SpaceH); + _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Tiles/Name/Space", navigator, ref _Theme.NameSpace); + _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Tiles/Name/H", navigator, ref _Theme.NameHeight); + _ThemeLoaded &= CHelper.GetValueFromXML(item + "/Tiles/Name/Font", navigator, ref _Theme.NameFont, "Normal"); + _ThemeLoaded &= CHelper.TryGetEnumValueFromXML(item + "/Tiles/Name/Style", navigator, ref _Theme.NameStyle); + if (CHelper.GetValueFromXML(item + "/Tiles/Name/Color", navigator, ref _Theme.NameColorName, String.Empty)) + { + _ThemeLoaded &= CTheme.GetColor(_Theme.NameColorName, SkinIndex, ref _Theme.NameColor); + } + else + { + if (CHelper.TryGetFloatValueFromXML(item + "/Tiles/Name/R", navigator, ref _Theme.NameColor.R)) + { + _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Tiles/Name/G", navigator, ref _Theme.NameColor.G); + _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Tiles/Name/B", navigator, ref _Theme.NameColor.B); + _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Tiles/Name/A", navigator, ref _Theme.NameColor.A); + } + } + + + if (_ThemeLoaded) + { + _Theme.Name = ElementName; + LoadTextures(); + } + return _ThemeLoaded; + } + + public bool SaveTheme(XmlWriter writer) + { + if (_ThemeLoaded) + { + writer.WriteStartElement(_Theme.Name); + + writer.WriteComment(", , , , : NameSelection position, width and height"); + writer.WriteElementString("X", Rect.X.ToString("#0")); + writer.WriteElementString("Y", Rect.Y.ToString("#0")); + writer.WriteElementString("Z", Rect.Z.ToString("#0.00")); + writer.WriteElementString("W", Rect.W.ToString("#0")); + writer.WriteElementString("H", Rect.H.ToString("#0")); + + + writer.WriteComment(": Texture name"); + writer.WriteElementString("SkinSelector", _Theme.TextureSelectorName); + + writer.WriteComment(": Static color from ColorScheme (high priority)"); + writer.WriteComment("or , , , (lower priority)"); + if (_Theme.ColorSelectorName != String.Empty) + { + writer.WriteElementString("ColorSelector", _Theme.ColorSelectorName); + } + else + { + writer.WriteElementString("R", ColorSelector.R.ToString("#0.00")); + writer.WriteElementString("G", ColorSelector.G.ToString("#0.00")); + writer.WriteElementString("B", ColorSelector.B.ToString("#0.00")); + writer.WriteElementString("A", ColorSelector.A.ToString("#0.00")); + } + + writer.WriteComment(": Texture name"); + writer.WriteElementString("SkinEmptyTile", _Theme.TextureEmptyTileName); + + writer.WriteComment(": Static color from ColorScheme (high priority)"); + writer.WriteComment("or , , , (lower priority)"); + if (_Theme.ColorEmptyTileName != String.Empty) + { + writer.WriteElementString("ColorEmptyTile", _Theme.ColorEmptyTileName); + } + else + { + writer.WriteElementString("R", ColorEmptyTile.R.ToString("#0.00")); + writer.WriteElementString("G", ColorEmptyTile.G.ToString("#0.00")); + writer.WriteElementString("B", ColorEmptyTile.B.ToString("#0.00")); + writer.WriteElementString("A", ColorEmptyTile.A.ToString("#0.00")); + } + + writer.WriteStartElement("Tiles"); + writer.WriteElementString("W", _TileW.ToString()); + writer.WriteElementString("H", _TileH.ToString()); + writer.WriteElementString("NumW", _NumW.ToString()); + writer.WriteElementString("NumH", _NumH.ToString()); + writer.WriteElementString("SpaceW", _SpaceW.ToString("#0.00")); + writer.WriteElementString("SpaceH", _SpaceH.ToString("#0.00")); + writer.WriteStartElement("Name"); + writer.WriteElementString("Space", _Theme.NameSpace.ToString("#0.0")); + writer.WriteElementString("Font", _Theme.NameFont); + if (_Theme.NameColorName != String.Empty) + { + writer.WriteElementString("Color", _Theme.NameColorName); + } + else + { + writer.WriteElementString("R", _Theme.NameColor.R.ToString("#0.00")); + writer.WriteElementString("G", _Theme.NameColor.G.ToString("#0.00")); + writer.WriteElementString("B", _Theme.NameColor.B.ToString("#0.00")); + writer.WriteElementString("A", _Theme.NameColor.A.ToString("#0.00")); + } + writer.WriteElementString("Style", _Theme.NameStyle.ToString()); + writer.WriteElementString("H", _Theme.NameHeight.ToString("#.00")); + writer.WriteEndElement(); + writer.WriteEndElement(); + + writer.WriteEndElement(); + return true; + } + return false; + } + + public void Draw() + { + Draw(false); + } + + public void ForceDraw() + { + Draw(true); + } + + public void Draw(bool ForceDraw) + { + foreach (CTile tile in _Tiles) + { + tile.Avatar.Draw(); + tile.Name.Draw(); + } + } + + public void UpdateList(int offset) + { + if (offset < 0) + offset = 0; + + if ( _Tiles.Count * (offset + 1) - CProfiles.Profiles.Length < _Tiles.Count) + { + + for (int i = 0; i < _Tiles.Count; i++) + { + if ((i + offset * _Tiles.Count) < CProfiles.Profiles.Length) + { + _Tiles[i].Avatar.Texture = CProfiles.Profiles[i + offset * _Tiles.Count].Avatar.Texture; + _Tiles[i].Avatar.Color = new SColorF(1, 1, 1, 1); + _Tiles[i].Name.Text = CProfiles.Profiles[i + offset * _Tiles.Count].PlayerName; + _Tiles[i].PlayerNr = i + offset * _Tiles.Count; + } + else + { + _Tiles[i].Avatar.Texture = _TextureEmptyTile; + _Tiles[i].Avatar.Color = ColorEmptyTile; + _Tiles[i].Name.Text = "Name"; + _Tiles[i].PlayerNr = -1; + } + } + _Offset = offset; + } + } + + public bool isOverTile(MouseEvent mevent) + { + bool isOver = false; + foreach (CTile tile in _Tiles) + { + if (CHelper.IsInBounds(tile.Avatar.Rect, mevent)) + { + isOver = true; + } + } + return isOver; + } + + public int TilePlayerNr(MouseEvent mevent) + { + foreach (CTile tile in _Tiles) + { + if (CHelper.IsInBounds(tile.Avatar.Rect, mevent)) + { + return tile.PlayerNr; + } + } + + return -1; + } + + public CStatic TilePlayerAvatar(MouseEvent mevent) + { + foreach (CTile tile in _Tiles) + { + if (CHelper.IsInBounds(tile.Avatar.Rect, mevent)) + { + return tile.Avatar; + } + } + + return new CStatic(); + } + + public void UnloadTextures() + { + } + + public void LoadTextures() + { + if (_Theme.ColorSelectorName != String.Empty) + ColorSelector = CTheme.GetColor(_Theme.ColorSelectorName); + } + + public void ReloadTextures() + { + UnloadTextures(); + LoadTextures(); + } + + #region ThemeEdit + public void MoveElement(int stepX, int stepY) + { + Rect.X += stepX; + Rect.Y += stepY; + } + + public void ResizeElement(int stepW, int stepH) + { + Rect.W += stepW; + if (Rect.W <= 0) + Rect.W = 1; + + Rect.H += stepH; + if (Rect.H <= 0) + Rect.H = 1; + } + #endregion ThemeEdit + + } +} diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index f61fc9f8..f2c045ce 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -141,17 +141,17 @@ namespace Vocaluxe.Screens OldMouseX = MouseEvent.X; OldMouseY = MouseEvent.Y; //Check if mouse if over tile - if (NameSelections[htNameSelections(NameSelection)].isOverTile(OldMouseX, OldMouseY)) + if (NameSelections[htNameSelections(NameSelection)].isOverTile(MouseEvent)) { //Get player-number of tile - SelectedPlayerNr = NameSelections[htNameSelections(NameSelection)].TilePlayerNr(OldMouseX, OldMouseY); + SelectedPlayerNr = NameSelections[htNameSelections(NameSelection)].TilePlayerNr(MouseEvent); if (SelectedPlayerNr != -1) { //Activate mouse-selecting selectingMouseActive = true; //Update of Drag/Drop-Texture - CStatic SelectedPlayer = NameSelections[htNameSelections(NameSelection)].TilePlayerAvatar(OldMouseX, OldMouseY); + CStatic SelectedPlayer = NameSelections[htNameSelections(NameSelection)].TilePlayerAvatar(MouseEvent); chooseAvatarStatic.Visible = true; chooseAvatarStatic.Rect = SelectedPlayer.Rect; chooseAvatarStatic.Rect.Z = CSettings.zNear - 5; @@ -232,6 +232,15 @@ namespace Vocaluxe.Screens { CGraphics.FadeTo(EScreens.ScreenSong); } + + if (MouseEvent.Wheel != 0) + { + if (CHelper.IsInBounds(NameSelections[htNameSelections(NameSelection)].Rect, MouseEvent)) + { + int offset = NameSelections[htNameSelections(NameSelection)]._Offset + MouseEvent.Wheel; + NameSelections[htNameSelections(NameSelection)].UpdateList(offset); + } + } return true; } From 6567aa413dce462f77785ca7cb8b470eaf85b192 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Sat, 31 Mar 2012 15:20:19 +0200 Subject: [PATCH 08/42] Added keyboard-support. Press 1-6 to start selecting player, enter to select and esc to abort. --- Vocaluxe/Menu/CNameSelection.cs | 158 +++++++++++++++++++++++-------- Vocaluxe/Screens/CScreenNames.cs | 65 ++++++++++++- 2 files changed, 178 insertions(+), 45 deletions(-) diff --git a/Vocaluxe/Menu/CNameSelection.cs b/Vocaluxe/Menu/CNameSelection.cs index 526969cf..aa81b3cf 100644 --- a/Vocaluxe/Menu/CNameSelection.cs +++ b/Vocaluxe/Menu/CNameSelection.cs @@ -4,6 +4,7 @@ using System.Drawing; using System.Text; using System.Xml; using System.Xml.XPath; +using System.Windows.Forms; using Vocaluxe.Base; using Vocaluxe.Lib.Draw; @@ -13,8 +14,6 @@ namespace Vocaluxe.Menu struct SThemeNameSelection { public string Name; - public string TextureSelectorName; - public string ColorSelectorName; public string TextureEmptyTileName; public string ColorEmptyTileName; public float NameSpace; @@ -55,10 +54,8 @@ namespace Vocaluxe.Menu public SRectF Rect; private List _Tiles; - private STexture _TextureSelector; private STexture _TextureEmptyTile; - public SColorF ColorSelector; public SColorF ColorEmptyTile; private int _NumW; @@ -72,13 +69,15 @@ namespace Vocaluxe.Menu public int _Offset = 0; private int _actualSelection = -1; + public int Selection = -1; + + int _player = -1; public CNameSelection() { _Theme = new SThemeNameSelection(); - _TextureSelector = CTheme.GetSkinTexture(_Theme.TextureSelectorName); _TextureEmptyTile = CTheme.GetSkinTexture(_Theme.TextureEmptyTileName); _Tiles = new List(); @@ -112,21 +111,6 @@ namespace Vocaluxe.Menu _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/W", navigator, ref Rect.W); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/H", navigator, ref Rect.H); - _ThemeLoaded &= CHelper.GetValueFromXML(item + "/SkinSelector", navigator, ref _Theme.TextureSelectorName, String.Empty); - - if (CHelper.GetValueFromXML(item + "/ColorSelector", navigator, ref _Theme.ColorSelectorName, String.Empty)) - { - _ThemeLoaded &= CTheme.GetColor(_Theme.ColorSelectorName, SkinIndex, ref ColorSelector); - } - else - { - _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/R", navigator, ref ColorSelector.R); - _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/G", navigator, ref ColorSelector.G); - _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/B", navigator, ref ColorSelector.B); - _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/A", navigator, ref ColorSelector.A); - } - - _ThemeLoaded &= CHelper.GetValueFromXML(item + "/SkinEmptyTile", navigator, ref _Theme.TextureEmptyTileName, String.Empty); if (CHelper.GetValueFromXML(item + "/ColorEmptyTile", navigator, ref _Theme.ColorEmptyTileName, String.Empty)) @@ -187,24 +171,6 @@ namespace Vocaluxe.Menu writer.WriteElementString("W", Rect.W.ToString("#0")); writer.WriteElementString("H", Rect.H.ToString("#0")); - - writer.WriteComment(": Texture name"); - writer.WriteElementString("SkinSelector", _Theme.TextureSelectorName); - - writer.WriteComment(": Static color from ColorScheme (high priority)"); - writer.WriteComment("or , , , (lower priority)"); - if (_Theme.ColorSelectorName != String.Empty) - { - writer.WriteElementString("ColorSelector", _Theme.ColorSelectorName); - } - else - { - writer.WriteElementString("R", ColorSelector.R.ToString("#0.00")); - writer.WriteElementString("G", ColorSelector.G.ToString("#0.00")); - writer.WriteElementString("B", ColorSelector.B.ToString("#0.00")); - writer.WriteElementString("A", ColorSelector.A.ToString("#0.00")); - } - writer.WriteComment(": Texture name"); writer.WriteElementString("SkinEmptyTile", _Theme.TextureEmptyTileName); @@ -266,10 +232,118 @@ namespace Vocaluxe.Menu public void Draw(bool ForceDraw) { + int i = 0; foreach (CTile tile in _Tiles) { + if (_player > -1) + { + if (_actualSelection == i) + { + tile.Avatar.Color = CTheme.GetPlayerColor(_player); + } + else + { + tile.Avatar.Color = new SColorF(1, 1, 1, 1); + } + } + else + { + tile.Avatar.Color = new SColorF(1, 1, 1, 1); + } tile.Avatar.Draw(); tile.Name.Draw(); + i++; + } + } + + public void HandleInput(KeyEvent kevent) + { + switch (kevent.Key) + { + case Keys.Right: + if (_actualSelection + 1 < _Tiles.Count) + { + _actualSelection++; + } + else + { + int offset = _Offset; + UpdateList(_Offset + 1); + if (offset != _Offset) + { + _actualSelection = 0; + } + } + break; + + case Keys.Left: + if (_actualSelection - 1 > -1) + { + _actualSelection--; + } + else if (_Offset > 0) + { + UpdateList(_Offset - 1); + _actualSelection = _Tiles.Count-1; + } + break; + + case Keys.Up: + if (_actualSelection - _NumW > -1) + { + _actualSelection -= _NumW; + } + else if (_Offset > 0) + { + UpdateList(_Offset - 1); + _actualSelection += _Tiles.Count- _NumW; + } + break; + + case Keys.Down: + if (_actualSelection + _NumW < _Tiles.Count - 1) + { + _actualSelection += _NumW; + } + else + { + int offset = _Offset; + UpdateList(_Offset + 1); + if (offset != _Offset) + { + _actualSelection = _actualSelection - _Tiles.Count + _NumW; + if (_Tiles[_actualSelection].PlayerNr == -1) + { + for (int i = _Tiles.Count - 1; i >= 0; i++) + { + if (_Tiles[i].PlayerNr != -1) + { + _actualSelection = i; + break; + } + } + } + } + } + break; + } + + Selection = _Offset * _Tiles.Count + _actualSelection; + } + + public void KeyboardSelection(bool active, int player) + { + if (active) + { + Selection = 0; + _actualSelection = 0; + _player = player; + } + else + { + Selection = -1; + _actualSelection = -1; + _player = -1; } } @@ -341,14 +415,18 @@ namespace Vocaluxe.Menu return new CStatic(); } + public CStatic TilePlayerAvatar(int nr) + { + nr -= _Offset * _Tiles.Count; + return _Tiles[nr].Avatar; + } + public void UnloadTextures() { } public void LoadTextures() { - if (_Theme.ColorSelectorName != String.Empty) - ColorSelector = CTheme.GetColor(_Theme.ColorSelectorName); } public void ReloadTextures() diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index f2c045ce..42463664 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -28,6 +28,8 @@ namespace Vocaluxe.Screens private readonly string[] TextPlayer = new string[] { "TextPlayer1", "TextPlayer2", "TextPlayer3", "TextPlayer4", "TextPlayer5", "TextPlayer6" }; private bool selectingMouseActive = false; + private bool selectingKeyboardActive = false; + private int selectingKeyboardPlayerNr = 0; private int SelectedPlayerNr; @@ -90,14 +92,38 @@ namespace Vocaluxe.Screens public override bool HandleInput(KeyEvent KeyEvent) { - base.HandleInput(KeyEvent); - - if (KeyEvent.KeyPressed && !Char.IsControl(KeyEvent.Unicode)) + if (selectingKeyboardActive) { + NameSelections[htNameSelections(NameSelection)].HandleInput(KeyEvent); + switch (KeyEvent.Key) + { + case Keys.Enter: + if (NameSelections[htNameSelections(NameSelection)].Selection > -1) + { + SelectedPlayerNr = NameSelections[htNameSelections(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; + CGame.Player[selectingKeyboardPlayerNr-1].ProfileID = SelectedPlayerNr; + //Update texture and name + Statics[htStatics(StaticPlayer[selectingKeyboardPlayerNr-1])].Texture = NameSelections[htNameSelections(NameSelection)].TilePlayerAvatar(SelectedPlayerNr).Texture; + Texts[htTexts(TextPlayer[selectingKeyboardPlayerNr-1])].Text = CProfiles.Profiles[SelectedPlayerNr].PlayerName; + } + selectingKeyboardPlayerNr = 0; + selectingKeyboardActive = false; + NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1); + break; + case Keys.Escape: + selectingKeyboardPlayerNr = 0; + selectingKeyboardActive = false; + NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1); + break; + } } else { + base.HandleInput(KeyEvent); bool processed = false; switch (KeyEvent.Key) { @@ -121,10 +147,40 @@ namespace Vocaluxe.Screens } break; + + case Keys.D1: + selectingKeyboardPlayerNr = 1; + break; + + case Keys.D2: + selectingKeyboardPlayerNr = 2; + break; + + case Keys.D3: + selectingKeyboardPlayerNr = 3; + break; + + case Keys.D4: + selectingKeyboardPlayerNr = 4; + break; + + case Keys.D5: + selectingKeyboardPlayerNr = 5; + break; + + case Keys.D6: + selectingKeyboardPlayerNr = 6; + break; } if (!processed) UpdatePlayerNumber(); + + if (selectingKeyboardPlayerNr > 0 && selectingKeyboardPlayerNr <= CConfig.NumPlayer) + { + selectingKeyboardActive = true; + NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, selectingKeyboardPlayerNr); + } } return true; @@ -183,8 +239,7 @@ namespace Vocaluxe.Screens if (Statics[htStatics(StaticPlayer[i])].Visible == true) { //Check if Mouse is in area - if (Statics[htStatics(StaticPlayer[i])].Rect.X < MouseEvent.X && (Statics[htStatics(StaticPlayer[i])].Rect.X + Statics[htStatics(StaticPlayer[i])].Rect.W) > MouseEvent.X - && Statics[htStatics(StaticPlayer[i])].Rect.Y < MouseEvent.Y && (Statics[htStatics(StaticPlayer[i])].Rect.Y + Statics[htStatics(StaticPlayer[i])].Rect.H) > MouseEvent.Y) + if (CHelper.IsInBounds(Statics[htStatics(StaticPlayer[i])].Rect, MouseEvent)) { //Update Game-infos with new player CGame.Player[i].Name = CProfiles.Profiles[SelectedPlayerNr].PlayerName; From 8f91d602707ea15d440b5e6960433fe59df5a176 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Sat, 31 Mar 2012 15:46:13 +0200 Subject: [PATCH 09/42] Some clean-up. --- Vocaluxe/Menu/CNameSelection.cs | 2 +- Vocaluxe/Screens/CScreenNames.cs | 20 +++++++------------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/Vocaluxe/Menu/CNameSelection.cs b/Vocaluxe/Menu/CNameSelection.cs index aa81b3cf..b02c2f61 100644 --- a/Vocaluxe/Menu/CNameSelection.cs +++ b/Vocaluxe/Menu/CNameSelection.cs @@ -92,7 +92,7 @@ namespace Vocaluxe.Menu { SRectF rect = new SRectF(Rect.X + j * (_TileW + _SpaceW), Rect.Y + i * (_TileH + _SpaceH), _TileW, _TileH, Rect.Z); CStatic tileStatic = new CStatic(_TextureEmptyTile, ColorEmptyTile, rect); - CText tileText = new CText(rect.X + rect.W / 2, rect.Y + rect.H + _Theme.NameSpace, rect.Z, _Theme.NameHeight, rect.W, EAlignment.Center, _Theme.NameStyle, _Theme.NameFont, _Theme.NameColor, "Name"); + CText tileText = new CText(rect.X + rect.W / 2, rect.Y + rect.H + _Theme.NameSpace, rect.Z, _Theme.NameHeight, rect.W, EAlignment.Center, _Theme.NameStyle, _Theme.NameFont, _Theme.NameColor, ""); _Tiles.Add(new CTile(tileStatic, tileText, -1)); } } diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index 42463664..88c2fad1 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -92,12 +92,15 @@ namespace Vocaluxe.Screens public override bool HandleInput(KeyEvent KeyEvent) { + //Check if selecting with keyboard is active if (selectingKeyboardActive) { + //Handle left/right/up/down NameSelections[htNameSelections(NameSelection)].HandleInput(KeyEvent); switch (KeyEvent.Key) { case Keys.Enter: + //Check, if a player is selected if (NameSelections[htNameSelections(NameSelection)].Selection > -1) { SelectedPlayerNr = NameSelections[htNameSelections(NameSelection)].Selection; @@ -109,18 +112,21 @@ namespace Vocaluxe.Screens Statics[htStatics(StaticPlayer[selectingKeyboardPlayerNr-1])].Texture = NameSelections[htNameSelections(NameSelection)].TilePlayerAvatar(SelectedPlayerNr).Texture; Texts[htTexts(TextPlayer[selectingKeyboardPlayerNr-1])].Text = CProfiles.Profiles[SelectedPlayerNr].PlayerName; } + //Reset all values selectingKeyboardPlayerNr = 0; selectingKeyboardActive = false; NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1); break; case Keys.Escape: + //Reset all values selectingKeyboardPlayerNr = 0; selectingKeyboardActive = false; NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1); break; } } + //Normal Keyboard handling else { base.HandleInput(KeyEvent); @@ -288,6 +294,7 @@ namespace Vocaluxe.Screens CGraphics.FadeTo(EScreens.ScreenSong); } + //Check mouse-wheel for scrolling if (MouseEvent.Wheel != 0) { if (CHelper.IsInBounds(NameSelections[htNameSelections(NameSelection)].Rect, MouseEvent)) @@ -361,14 +368,6 @@ namespace Vocaluxe.Screens SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection = CConfig.NumPlayer - 1; } - private void UpdateSelection() - { - for (int i = 0; i < _PlayerNr.Length; i++) - { - - } - } - private void UpdatePlayerNumber() { CConfig.NumPlayer = (int)SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection + 1; @@ -390,11 +389,6 @@ namespace Vocaluxe.Screens CheckMics(); } - private void UpdateVisibility() - { - - } - private void CheckMics() { List _PlayerWithoutMicro = new List(); From f2dbe6c9656caa1b057bdd36eaaa13ddf635616f Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Sun, 1 Apr 2012 23:52:22 +0200 Subject: [PATCH 10/42] Some theme adjustments.... --- Output/Languages/Deutsch.xml | 1 + Output/Languages/English.xml | 1 + Output/Languages/French.xml | 1 + Output/Languages/Spanish.xml | 1 + Output/Themes/Ambient/PlayerSelector.png | Bin 0 -> 1086 bytes Output/Themes/Ambient/Screens/ScreenNames.xml | 208 +++++++++++++----- Output/Themes/Ambient/Skin Blue.xml | 3 +- Output/Themes/Ambient/Skin Green.xml | 3 +- Output/Themes/Ambient/Skin Red.xml | 3 +- Output/Themes/Ambient/Skin Yellow.xml | 3 +- .../Changelog/Changelog_ScreenNames.txt | 3 +- Vocaluxe/Menu/CNameSelection.cs | 2 +- Vocaluxe/Screens/CScreenNames.cs | 14 +- 13 files changed, 178 insertions(+), 65 deletions(-) create mode 100644 Output/Themes/Ambient/PlayerSelector.png diff --git a/Output/Languages/Deutsch.xml b/Output/Languages/Deutsch.xml index 56978034..1593fd3b 100644 --- a/Output/Languages/Deutsch.xml +++ b/Output/Languages/Deutsch.xml @@ -101,6 +101,7 @@ Profile Spielerauswahl + Spieler 1 Spieler 2 Spieler 3 Spieler diff --git a/Output/Languages/English.xml b/Output/Languages/English.xml index 0b543a31..59a81e1e 100644 --- a/Output/Languages/English.xml +++ b/Output/Languages/English.xml @@ -101,6 +101,7 @@ Profiles Player Selection + Player 1 Player 2 Player 3 Player diff --git a/Output/Languages/French.xml b/Output/Languages/French.xml index 74c3e558..8021012d 100644 --- a/Output/Languages/French.xml +++ b/Output/Languages/French.xml @@ -101,6 +101,7 @@ Profils Sélection des joueurs + Joueur 1 joueur 2 joueurs 3 joueurs diff --git a/Output/Languages/Spanish.xml b/Output/Languages/Spanish.xml index 3516d39d..a0600e84 100644 --- a/Output/Languages/Spanish.xml +++ b/Output/Languages/Spanish.xml @@ -101,6 +101,7 @@ Perfiles Selección de Jugadores + Jugador Jugador 1 Jugador 2 Jugador 3 diff --git a/Output/Themes/Ambient/PlayerSelector.png b/Output/Themes/Ambient/PlayerSelector.png new file mode 100644 index 0000000000000000000000000000000000000000..c57ab300c6f81daf0fa108e731ea9f8864af7f7e GIT binary patch literal 1086 zcmeAS@N?(olHy`uVBq!ia0vp^zd)FS4M=vpiLwP!jKx9jP7LeL$-D$|*pj^6U4S$Y z{B+)352QE?JR*x37`TN&n2}-D90{Nxdx@v7EBhT5MiD*UuHKV5Kq1-8kcblJ{M_8s zyb>Unfx)>bHL)Z$MWH;iBtya7(>EYRFO{8vfqAN@i(^Q|t+%%f{iFj$+AjWgD_M5* z^@63v?^O>dd3fn7q<&EPAarNxg2hYE2`yl~HC-t=MOu1|hSHfAbGXv}%+ju{IzP{o zq2b?ZXZssb(yEr;M!rU#MOif;9=@A&MxHVa->RI{Ik{Bw@N#4SPkUF% z{j>UV?N;Ta?9DCy?-#8S`<+*JQ@CR5wRJ9hdkgPI?ao^J_RgOEZ#usouHf6dIqTc& z-R|YbOC|0Z?%Sqh?^%@ZccJ?6SNRv)_AfqvhMg^OTe185d6VsD@$($}_{#G4ufDo8 zJp&DW-}V1r+1VBp&XoUC{~=9TtCk2@DU>+8Xt=<*klBg7g^xoPgi!=x5->r>7j6s?r7#i3h0O^45J5CU z1+35vCDJA&cM)qYy3>H(!t?=}xd@Ly0|ASB(apv1a>E5j7IK05qHk;S0(QJwK(ooZtj#P7jqH}`c}Wn zeEi~G?2OsGJcnvTe;(_*_x6>#=ex5URrxWY{HyEDz(1KdYfeXDSTo1Mtzxw z3$MF>JNoTtt^S!BVe2pYpVr+Cf3-Gr?bgpK*PpTPwOFVB?QYFy(HnUWZ@lB1UnMTT zU-aj0>tEO2*?ARBOPQ52>B*IzhllSzJujVqT4np|{tFBZ3xD%6HRiFe7S=op%DJAd KelF{r5}E*YeWUFF literal 0 HcmV?d00001 diff --git a/Output/Themes/Ambient/Screens/ScreenNames.xml b/Output/Themes/Ambient/Screens/ScreenNames.xml index 516f554d..8b8ae42a 100644 --- a/Output/Themes/Ambient/Screens/ScreenNames.xml +++ b/Output/Themes/Ambient/Screens/ScreenNames.xml @@ -31,106 +31,202 @@ - Button + PlayerSelector 15 100 - 0,00 - 100 - 100 + -2,00 + 118 + 118 - StaticColor + Player1 - Button + PlayerSelector 15 255 - 0,00 - 100 - 100 + -2,00 + 118 + 118 - StaticColor + Player2 - Button + PlayerSelector 15 410 - 0,00 - 100 - 100 + -2,00 + 118 + 118 - StaticColor + Player3 - Button + PlayerSelector - 1165 + 1147 100 - 0,00 - 100 - 100 + -2,00 + 118 + 118 - StaticColor + Player4 - Button + PlayerSelector - 1165 + 1147 255 - 0,00 - 100 - 100 + -2,00 + 118 + 118 - StaticColor + Player5 - Button + PlayerSelector - 1165 + 1147 410 - 0,00 - 100 - 100 + -2,00 + 118 + 118 - StaticColor + Player6 + + + Invisible + + 20 + 105 + -3,00 + 108 + 108 + + + Visible + + + + + + + Invisible + + 20 + 260 + -3,00 + 108 + 108 + + + Visible + + + + + + + Invisible + + 20 + 415 + -3,00 + 108 + 108 + + + Visible + + + + + + + Invisible + + 1152 + 105 + -3,00 + 108 + 108 + + + Visible + + + + + + + Invisible + + 1152 + 260 + -3,00 + 108 + 108 + + + Visible + + + + + + + Invisible + + 1152 + 415 + -3,00 + 108 + 108 + + + Visible + + + + Invisible 145 - 660 + 663 0,00 990 50 @@ -170,8 +266,8 @@ - 65 - 203 + 74 + 219 0,00 @@ -197,8 +293,8 @@ - 65 - 358 + 74 + 374 0,00 @@ -224,8 +320,8 @@ - 65 - 513 + 74 + 529 0,00 @@ -251,8 +347,8 @@ - 1205 - 203 + 1206 + 219 0,00 @@ -278,8 +374,8 @@ - 1205 - 358 + 1206 + 374 0,00 @@ -305,8 +401,8 @@ - 1205 - 513 + 1206 + 529 0,00 @@ -333,7 +429,7 @@ 640 - 612 + 615 0,00 @@ -365,7 +461,7 @@ Button 145 - 600 + 603 0,00 150 50 @@ -420,7 +516,7 @@ Button 985 - 600 + 603 0,00 150 50 @@ -485,19 +581,19 @@ SelectSlidePlayer 70 - 545 + 548 0,00 1140 45 75 - 550 + 553 0,00 40 40 1170 - 550 + 553 0,00 40 40 @@ -534,10 +630,10 @@ 6 - 150 - 100 + 152 + 127 0,00 - 1020 + 970 500 Button SelectSlideSColor @@ -548,7 +644,7 @@ 100 8 3 - 15 + 24,28 30 2 diff --git a/Output/Themes/Ambient/Skin Blue.xml b/Output/Themes/Ambient/Skin Blue.xml index 0e74cee0..b6666254 100644 --- a/Output/Themes/Ambient/Skin Blue.xml +++ b/Output/Themes/Ambient/Skin Blue.xml @@ -264,6 +264,7 @@ DuetIcon.png VideoIcon.png Invisible.png + PlayerSelector.png [Blue]BG_Video.mp4 @@ -271,4 +272,4 @@ [Blue]IntroMid.mp4 [Blue]IntroOut.mp4 - \ No newline at end of file + diff --git a/Output/Themes/Ambient/Skin Green.xml b/Output/Themes/Ambient/Skin Green.xml index f09b623f..aad0e003 100644 --- a/Output/Themes/Ambient/Skin Green.xml +++ b/Output/Themes/Ambient/Skin Green.xml @@ -264,6 +264,7 @@ DuetIcon.png VideoIcon.png Invisible.png + PlayerSelector.png [Green]BG_Video.mp4 @@ -271,4 +272,4 @@ [Green]IntroMid.mp4 [Green]IntroOut.mp4 - \ No newline at end of file + diff --git a/Output/Themes/Ambient/Skin Red.xml b/Output/Themes/Ambient/Skin Red.xml index 1ab926eb..cc4e2609 100644 --- a/Output/Themes/Ambient/Skin Red.xml +++ b/Output/Themes/Ambient/Skin Red.xml @@ -264,6 +264,7 @@ DuetIcon.png VideoIcon.png Invisible.png + PlayerSelector.png [Red]BG_Video.mp4 @@ -271,4 +272,4 @@ [Red]IntroMid.mp4 [Red]IntroOut.mp4 - \ No newline at end of file + diff --git a/Output/Themes/Ambient/Skin Yellow.xml b/Output/Themes/Ambient/Skin Yellow.xml index 8871e722..e0f2737a 100644 --- a/Output/Themes/Ambient/Skin Yellow.xml +++ b/Output/Themes/Ambient/Skin Yellow.xml @@ -264,6 +264,7 @@ DuetIcon.png VideoIcon.png Invisible.png + PlayerSelector.png [Yellow]BG_Video.mp4 @@ -271,4 +272,4 @@ [Yellow]IntroMid.mp4 [Yellow]IntroOut.mp4 - \ No newline at end of file + diff --git a/Output/Themes/Changelog/Changelog_ScreenNames.txt b/Output/Themes/Changelog/Changelog_ScreenNames.txt index 8db4f34f..e4613ca9 100644 --- a/Output/Themes/Changelog/Changelog_ScreenNames.txt +++ b/Output/Themes/Changelog/Changelog_ScreenNames.txt @@ -8,7 +8,8 @@ Add: A new Theme-element for name-selecting. - (One Static for eacht player): Static wich shows the selected player and is used as drop-area + (One Static for each player): Static wich is used as drop-area + (One Static for each player): Static wich shows the avatar of selected player (One Text for each player): Text wich shows name of selected player diff --git a/Vocaluxe/Menu/CNameSelection.cs b/Vocaluxe/Menu/CNameSelection.cs index b02c2f61..046653d6 100644 --- a/Vocaluxe/Menu/CNameSelection.cs +++ b/Vocaluxe/Menu/CNameSelection.cs @@ -368,7 +368,7 @@ namespace Vocaluxe.Menu { _Tiles[i].Avatar.Texture = _TextureEmptyTile; _Tiles[i].Avatar.Color = ColorEmptyTile; - _Tiles[i].Name.Text = "Name"; + _Tiles[i].Name.Text = ""; _Tiles[i].PlayerNr = -1; } } diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index 88c2fad1..c4abddcd 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -24,7 +24,8 @@ namespace Vocaluxe.Screens private const string ButtonStart = "ButtonStart"; private const string TextWarning = "TextWarning"; private const string StaticWarning = "StaticWarning"; - private readonly string[] StaticPlayer = new string[] {"StaticPlayer1", "StaticPlayer2", "StaticPlayer3", "StaticPlayer4", "StaticPlayer5", "StaticPlayer6"}; + private readonly string[] StaticPlayer = new string[] { "StaticPlayer1", "StaticPlayer2", "StaticPlayer3", "StaticPlayer4", "StaticPlayer5", "StaticPlayer6" }; + private readonly string[] StaticPlayerAvatar = new string[] { "StaticPlayerAvatar1", "StaticPlayerAvatar2", "StaticPlayerAvatar3", "StaticPlayerAvatar4", "StaticPlayerAvatar5", "StaticPlayerAvatar6" }; private readonly string[] TextPlayer = new string[] { "TextPlayer1", "TextPlayer2", "TextPlayer3", "TextPlayer4", "TextPlayer5", "TextPlayer6" }; private bool selectingMouseActive = false; @@ -51,6 +52,10 @@ namespace Vocaluxe.Screens foreach(string text in StaticPlayer){ statics.Add(text); } + foreach (string text in StaticPlayerAvatar) + { + statics.Add(text); + } statics.Add(StaticWarning); _ThemeStatics = statics.ToArray(); @@ -109,7 +114,7 @@ namespace Vocaluxe.Screens CGame.Player[selectingKeyboardPlayerNr-1].Difficulty = CProfiles.Profiles[SelectedPlayerNr].Difficulty; CGame.Player[selectingKeyboardPlayerNr-1].ProfileID = SelectedPlayerNr; //Update texture and name - Statics[htStatics(StaticPlayer[selectingKeyboardPlayerNr-1])].Texture = NameSelections[htNameSelections(NameSelection)].TilePlayerAvatar(SelectedPlayerNr).Texture; + Statics[htStatics(StaticPlayerAvatar[selectingKeyboardPlayerNr-1])].Texture = NameSelections[htNameSelections(NameSelection)].TilePlayerAvatar(SelectedPlayerNr).Texture; Texts[htTexts(TextPlayer[selectingKeyboardPlayerNr-1])].Text = CProfiles.Profiles[SelectedPlayerNr].PlayerName; } //Reset all values @@ -252,7 +257,7 @@ namespace Vocaluxe.Screens CGame.Player[i].Difficulty = CProfiles.Profiles[SelectedPlayerNr].Difficulty; CGame.Player[i].ProfileID = SelectedPlayerNr; //Update texture and name - Statics[htStatics(StaticPlayer[i])].Texture = chooseAvatarStatic.Texture; + Statics[htStatics(StaticPlayerAvatar[i])].Texture = chooseAvatarStatic.Texture; Texts[htTexts(TextPlayer[i])].Text = CProfiles.Profiles[SelectedPlayerNr].PlayerName; } } @@ -377,11 +382,14 @@ namespace Vocaluxe.Screens if (i <= CGame.NumPlayer) { Statics[htStatics("StaticPlayer" + i)].Visible = true; + Statics[htStatics("StaticPlayerAvatar" + i)].Visible = true; Texts[htTexts("TextPlayer" + i)].Visible = true; + Texts[htTexts("TextPlayer" + i)].Text = CLanguage.Translate("TR_SCREENNAMES_PLAYER") + " " + i.ToString(); } else { Statics[htStatics("StaticPlayer" + i)].Visible = false; + Statics[htStatics("StaticPlayerAvatar" + i)].Visible = false; Texts[htTexts("TextPlayer" + i)].Visible = false; } } From dc574605f1b0e04efdc8de38df8e4bcf2f59a99e Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Mon, 2 Apr 2012 00:08:52 +0200 Subject: [PATCH 11/42] Fix problem with showing names. --- Vocaluxe/Screens/CScreenNames.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index c4abddcd..a19d1966 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -384,7 +384,10 @@ namespace Vocaluxe.Screens Statics[htStatics("StaticPlayer" + i)].Visible = true; Statics[htStatics("StaticPlayerAvatar" + i)].Visible = true; Texts[htTexts("TextPlayer" + i)].Visible = true; - Texts[htTexts("TextPlayer" + i)].Text = CLanguage.Translate("TR_SCREENNAMES_PLAYER") + " " + i.ToString(); + if (Texts[htTexts("TextPlayer" + i)].Text == string.Empty) + { + Texts[htTexts("TextPlayer" + i)].Text = CLanguage.Translate("TR_SCREENNAMES_PLAYER") + " " + i.ToString(); + } } else { From 217bbaded03866606ec4c9fac488895cc9bb52f1 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Mon, 2 Apr 2012 13:38:23 +0200 Subject: [PATCH 12/42] If name selection is active, press active player-number to exit selection or other player-number to select an other player... --- Vocaluxe/Menu/CNameSelection.cs | 9 +++- Vocaluxe/Screens/CScreenNames.cs | 84 ++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+), 1 deletion(-) diff --git a/Vocaluxe/Menu/CNameSelection.cs b/Vocaluxe/Menu/CNameSelection.cs index 046653d6..34f6d247 100644 --- a/Vocaluxe/Menu/CNameSelection.cs +++ b/Vocaluxe/Menu/CNameSelection.cs @@ -333,12 +333,19 @@ namespace Vocaluxe.Menu public void KeyboardSelection(bool active, int player) { - if (active) + //Overwrite player-selection; Same profile, but other player + if (active && Selection != -1) + { + _player = player; + } + //Normal activation + else if (active) { Selection = 0; _actualSelection = 0; _player = player; } + //Deactivate else { Selection = -1; diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index a19d1966..199eb0d3 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -123,6 +123,90 @@ namespace Vocaluxe.Screens NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1); break; + case Keys.D1: + if (selectingKeyboardPlayerNr == 1) + { + //Reset all values + selectingKeyboardPlayerNr = 0; + selectingKeyboardActive = false; + NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1); + } + else + { + selectingKeyboardPlayerNr = 1; + NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 1); + } + break; + case Keys.D2: + if (selectingKeyboardPlayerNr == 2) + { + //Reset all values + selectingKeyboardPlayerNr = 0; + selectingKeyboardActive = false; + NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1); + } + else + { + selectingKeyboardPlayerNr = 2; + NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 2); + } + break; + case Keys.D3: + if (selectingKeyboardPlayerNr == 3) + { + //Reset all values + selectingKeyboardPlayerNr = 0; + selectingKeyboardActive = false; + NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1); + } + else + { + selectingKeyboardPlayerNr = 3; + NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 3); + } + break; + case Keys.D4: + if (selectingKeyboardPlayerNr == 4) + { + //Reset all values + selectingKeyboardPlayerNr = 0; + selectingKeyboardActive = false; + NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1); + } + else + { + selectingKeyboardPlayerNr = 4; + NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 4); + } + break; + case Keys.D5: + if (selectingKeyboardPlayerNr == 5) + { + //Reset all values + selectingKeyboardPlayerNr = 0; + selectingKeyboardActive = false; + NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1); + } + else + { + selectingKeyboardPlayerNr = 5; + NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 5); + } + break; + case Keys.D6: + if (selectingKeyboardPlayerNr == 6) + { + //Reset all values + selectingKeyboardPlayerNr = 0; + selectingKeyboardActive = false; + NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1); + } + else + { + selectingKeyboardPlayerNr = 6; + NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 6); + } + break; case Keys.Escape: //Reset all values selectingKeyboardPlayerNr = 0; From f11be295f7be3e1d168837f087b4d6d8b3889d01 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Mon, 2 Apr 2012 14:08:14 +0200 Subject: [PATCH 13/42] Fix bug in selecting with keyboard. --- Vocaluxe/Menu/CNameSelection.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Vocaluxe/Menu/CNameSelection.cs b/Vocaluxe/Menu/CNameSelection.cs index 34f6d247..2674e458 100644 --- a/Vocaluxe/Menu/CNameSelection.cs +++ b/Vocaluxe/Menu/CNameSelection.cs @@ -263,7 +263,11 @@ namespace Vocaluxe.Menu case Keys.Right: if (_actualSelection + 1 < _Tiles.Count) { - _actualSelection++; + if (_Tiles[_actualSelection + 1].PlayerNr != -1) + { + _actualSelection++; + } + } else { @@ -301,9 +305,12 @@ namespace Vocaluxe.Menu break; case Keys.Down: - if (_actualSelection + _NumW < _Tiles.Count - 1) + if (_actualSelection + _NumW < _Tiles.Count-1) { - _actualSelection += _NumW; + if (_Tiles[_actualSelection + _NumW].PlayerNr != -1) + { + _actualSelection += _NumW; + } } else { From ef55a9e83b1598f4bba02cec0f25ca93ea9d63c2 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Mon, 2 Apr 2012 14:17:16 +0200 Subject: [PATCH 14/42] Use NumBlock-Numbers for choosing player, too. Add +/- to change player-number. --- Vocaluxe/Screens/CScreenNames.cs | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index 199eb0d3..a78e970e 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -97,6 +97,26 @@ namespace Vocaluxe.Screens public override bool HandleInput(KeyEvent KeyEvent) { + switch (KeyEvent.Key) + { + case Keys.Add: + if (CConfig.NumPlayer + 1 <= CSettings.MaxNumPlayer) + { + CConfig.NumPlayer++; + SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection = CConfig.NumPlayer - 1; + UpdatePlayerNumber(); + } + break; + + case Keys.Subtract: + if (CConfig.NumPlayer - 1 > 0) + { + CConfig.NumPlayer--; + SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection = CConfig.NumPlayer - 1; + UpdatePlayerNumber(); + } + break; + } //Check if selecting with keyboard is active if (selectingKeyboardActive) { @@ -124,6 +144,7 @@ namespace Vocaluxe.Screens break; case Keys.D1: + case Keys.NumPad1: if (selectingKeyboardPlayerNr == 1) { //Reset all values @@ -138,6 +159,7 @@ namespace Vocaluxe.Screens } break; case Keys.D2: + case Keys.NumPad2: if (selectingKeyboardPlayerNr == 2) { //Reset all values @@ -152,6 +174,7 @@ namespace Vocaluxe.Screens } break; case Keys.D3: + case Keys.NumPad3: if (selectingKeyboardPlayerNr == 3) { //Reset all values @@ -166,6 +189,7 @@ namespace Vocaluxe.Screens } break; case Keys.D4: + case Keys.NumPad4: if (selectingKeyboardPlayerNr == 4) { //Reset all values @@ -180,6 +204,7 @@ namespace Vocaluxe.Screens } break; case Keys.D5: + case Keys.NumPad5: if (selectingKeyboardPlayerNr == 5) { //Reset all values @@ -194,6 +219,7 @@ namespace Vocaluxe.Screens } break; case Keys.D6: + case Keys.NumPad6: if (selectingKeyboardPlayerNr == 6) { //Reset all values @@ -244,26 +270,32 @@ namespace Vocaluxe.Screens break; case Keys.D1: + case Keys.NumPad1: selectingKeyboardPlayerNr = 1; break; case Keys.D2: + case Keys.NumPad2: selectingKeyboardPlayerNr = 2; break; case Keys.D3: + case Keys.NumPad3: selectingKeyboardPlayerNr = 3; break; case Keys.D4: + case Keys.NumPad4: selectingKeyboardPlayerNr = 4; break; case Keys.D5: + case Keys.NumPad5: selectingKeyboardPlayerNr = 5; break; case Keys.D6: + case Keys.NumPad6: selectingKeyboardPlayerNr = 6; break; } From 5d0ffec05e51229356c92fcd60314bfeda7c9581 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Mon, 2 Apr 2012 14:21:54 +0200 Subject: [PATCH 15/42] Show second lyrics also for 4-player-singing. --- Vocaluxe/Screens/CScreenSing.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index fc90a9d5..7152d80d 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -496,7 +496,7 @@ namespace Vocaluxe.Screens SingNotes[htSingNotes(SingBars)].Reset(); - bool LyricsOnTop = CGame.NumPlayer == 2 && CConfig.LyricsOnTop == EOffOn.TR_CONFIG_ON; + bool LyricsOnTop = (CGame.NumPlayer == 2 || CGame.NumPlayer == 4) && CConfig.LyricsOnTop == EOffOn.TR_CONFIG_ON; if (song.IsDuet) { CGame.Player[1].LineNr = 1; From 20c684c494a48ebf136042e0251b7a1f8418e7bb Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Mon, 2 Apr 2012 14:33:01 +0200 Subject: [PATCH 16/42] Update ProgramCodeName --- Vocaluxe/Base/CSettings.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vocaluxe/Base/CSettings.cs b/Vocaluxe/Base/CSettings.cs index 69be5d2d..cbf1e59f 100644 --- a/Vocaluxe/Base/CSettings.cs +++ b/Vocaluxe/Base/CSettings.cs @@ -40,7 +40,7 @@ namespace Vocaluxe.Base public static EGameState GameState = EGameState.Start; public const string sProgramName = "Vocaluxe"; - public const string sProgramCodeName = "Rising Star"; + public const string sProgramCodeName = "6 Player Test"; public const int iVersionMajor = 0; public const int iVersionMinor = 1; // milestones From 20087ef7dbf6ff2eb811cc75020b7bd36ab1f8a1 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Mon, 2 Apr 2012 18:34:55 +0200 Subject: [PATCH 17/42] Don't show "Rating:" and "Difficulty:" on ScoreScreen.... --- Vocaluxe/Screens/CScreenScore.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Vocaluxe/Screens/CScreenScore.cs b/Vocaluxe/Screens/CScreenScore.cs index eb7bf9b8..21b0a92f 100644 --- a/Vocaluxe/Screens/CScreenScore.cs +++ b/Vocaluxe/Screens/CScreenScore.cs @@ -260,8 +260,16 @@ namespace Vocaluxe.Screens { Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Text = player[p].Name; Texts[htTexts(TextScores[p, CGame.NumPlayer - 1])].Text = ((int)Math.Round(player[p].Points)).ToString("0000") + " " + CLanguage.Translate("TR_SCREENSCORE_POINTS"); - Texts[htTexts(TextRatings[p, CGame.NumPlayer - 1])].Text = CLanguage.Translate("TR_SCREENSCORE_RATING") + ": " + CLanguage.Translate(GetRating((int)Math.Round(player[p].Points))); - Texts[htTexts(TextDifficulty[p, CGame.NumPlayer - 1])].Text = CLanguage.Translate("TR_SCREENSCORE_GAMEDIFFICULTY") + ": " + CLanguage.Translate(player[p].Difficulty.ToString()); + if (CGame.NumPlayer <= 3) + { + Texts[htTexts(TextRatings[p, CGame.NumPlayer - 1])].Text = CLanguage.Translate("TR_SCREENSCORE_RATING") + ": " + CLanguage.Translate(GetRating((int)Math.Round(player[p].Points))); + Texts[htTexts(TextDifficulty[p, CGame.NumPlayer - 1])].Text = CLanguage.Translate("TR_SCREENSCORE_GAMEDIFFICULTY") + ": " + CLanguage.Translate(player[p].Difficulty.ToString()); + } + else + { + Texts[htTexts(TextRatings[p, CGame.NumPlayer - 1])].Text = CLanguage.Translate(GetRating((int)Math.Round(player[p].Points))); + Texts[htTexts(TextDifficulty[p, CGame.NumPlayer - 1])].Text = CLanguage.Translate(player[p].Difficulty.ToString()); + } StaticPointsBarDrawnPoints[p] = 0.0; 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; From 0ac0ce49d0717b740f18f6d3d8df2e31a96a4c60 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Mon, 2 Apr 2012 18:43:49 +0200 Subject: [PATCH 18/42] Change color for player 5. --- Output/Themes/Ambient/Skin Blue.xml | 12 ++++++------ Output/Themes/Ambient/Skin Green.xml | 12 ++++++------ Output/Themes/Ambient/Skin Red.xml | 12 ++++++------ Output/Themes/Ambient/Skin Yellow.xml | 12 ++++++------ 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Output/Themes/Ambient/Skin Blue.xml b/Output/Themes/Ambient/Skin Blue.xml index b6666254..0be63f4b 100644 --- a/Output/Themes/Ambient/Skin Blue.xml +++ b/Output/Themes/Ambient/Skin Blue.xml @@ -33,9 +33,9 @@ 1,000 - 0,000 - 0,500 - 1,000 + 1,000 + 0,800 + 0,000 1,000 @@ -71,9 +71,9 @@ 0,500 - 0,000 - 0,500 - 1,000 + 1,000 + 0,800 + 0,000 0,500 diff --git a/Output/Themes/Ambient/Skin Green.xml b/Output/Themes/Ambient/Skin Green.xml index aad0e003..11ad8556 100644 --- a/Output/Themes/Ambient/Skin Green.xml +++ b/Output/Themes/Ambient/Skin Green.xml @@ -33,9 +33,9 @@ 1,000 - 0,000 - 0,500 - 1,000 + 1,000 + 0,800 + 0,000 1,000 @@ -71,9 +71,9 @@ 0,500 - 0,000 - 0,500 - 1,000 + 1,000 + 0,800 + 0,000 0,500 diff --git a/Output/Themes/Ambient/Skin Red.xml b/Output/Themes/Ambient/Skin Red.xml index cc4e2609..e00b17a7 100644 --- a/Output/Themes/Ambient/Skin Red.xml +++ b/Output/Themes/Ambient/Skin Red.xml @@ -33,9 +33,9 @@ 1,000 - 0,000 - 0,500 - 1,000 + 1,000 + 0,800 + 0,000 1,000 @@ -71,9 +71,9 @@ 0,500 - 0,000 - 0,500 - 1,000 + 1,000 + 0,800 + 0,000 0,500 diff --git a/Output/Themes/Ambient/Skin Yellow.xml b/Output/Themes/Ambient/Skin Yellow.xml index e0f2737a..f6065aa7 100644 --- a/Output/Themes/Ambient/Skin Yellow.xml +++ b/Output/Themes/Ambient/Skin Yellow.xml @@ -33,9 +33,9 @@ 1,000 - 0,000 - 0,500 - 1,000 + 1,000 + 0,800 + 0,000 1,000 @@ -71,9 +71,9 @@ 0,500 - 0,000 - 0,500 - 1,000 + 1,000 + 0,800 + 0,000 0,500 From 02ed1e9b0b00e73a96c32586962979dce1046720 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Mon, 2 Apr 2012 18:45:12 +0200 Subject: [PATCH 19/42] Fix wrong color on SingScreen. --- Output/Themes/Ambient/Screens/ScreenSing.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Output/Themes/Ambient/Screens/ScreenSing.xml b/Output/Themes/Ambient/Screens/ScreenSing.xml index 1c4c98c0..147713db 100644 --- a/Output/Themes/Ambient/Screens/ScreenSing.xml +++ b/Output/Themes/Ambient/Screens/ScreenSing.xml @@ -1147,7 +1147,7 @@ - Player3 + Player4 Player4 From 999923bbd978e4f75c67a79abe56bf90d6e50d1c Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Mon, 2 Apr 2012 22:53:49 +0200 Subject: [PATCH 20/42] Fix colors on ScoreScreen. --- Output/Themes/Ambient/Screens/ScreenScore.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Output/Themes/Ambient/Screens/ScreenScore.xml b/Output/Themes/Ambient/Screens/ScreenScore.xml index 539c8bf3..b026c327 100644 --- a/Output/Themes/Ambient/Screens/ScreenScore.xml +++ b/Output/Themes/Ambient/Screens/ScreenScore.xml @@ -829,9 +829,9 @@ 220 - 0,00 - 0,50 - 1,00 + 1,000 + 0,800 + 0,000 0,75 @@ -1104,9 +1104,9 @@ 220 - 0,00 - 0,50 - 1,00 + 1,000 + 0,800 + 0,000 0,75 From 1f29aa77591b56dc7449ee66edbc5ab101761d09 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Mon, 2 Apr 2012 22:55:08 +0200 Subject: [PATCH 21/42] Fix name-selection with keyboard. --- Vocaluxe/Menu/CNameSelection.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Vocaluxe/Menu/CNameSelection.cs b/Vocaluxe/Menu/CNameSelection.cs index 2674e458..526e9277 100644 --- a/Vocaluxe/Menu/CNameSelection.cs +++ b/Vocaluxe/Menu/CNameSelection.cs @@ -305,7 +305,7 @@ namespace Vocaluxe.Menu break; case Keys.Down: - if (_actualSelection + _NumW < _Tiles.Count-1) + if (_actualSelection + _NumW < _Tiles.Count) { if (_Tiles[_actualSelection + _NumW].PlayerNr != -1) { @@ -321,7 +321,7 @@ namespace Vocaluxe.Menu _actualSelection = _actualSelection - _Tiles.Count + _NumW; if (_Tiles[_actualSelection].PlayerNr == -1) { - for (int i = _Tiles.Count - 1; i >= 0; i++) + for (int i = (_Tiles.Count - 1); i >= 0; i--) { if (_Tiles[i].PlayerNr != -1) { From c428dbb404aba56706c032ea1700d420ca21d180 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Fri, 6 Apr 2012 11:40:45 +0200 Subject: [PATCH 22/42] Save selected players to config and load them on start. --- Vocaluxe/Base/CConfig.cs | 37 ++++++++++++++++++++++++++++++++ Vocaluxe/Base/CGame.cs | 2 ++ Vocaluxe/Screens/CScreenNames.cs | 13 +++++++++++ 3 files changed, 52 insertions(+) diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index 02ad6565..66dfa6b7 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -206,6 +206,7 @@ namespace Vocaluxe.Base public static EOffOn Tabs = EOffOn.TR_CONFIG_OFF; public static string Language = "English"; public static EOffOn LyricsOnTop = EOffOn.TR_CONFIG_OFF; + public static string[] Players = new string[CSettings.MaxNumPlayer]; // Video public static EVideoDecoder VideoDecoder = EVideoDecoder.FFmpeg; @@ -370,6 +371,12 @@ namespace Vocaluxe.Base } CLanguage.SetLanguage(Language); + //Read players from config + for (i = 1; i <= CSettings.MaxNumPlayer; i++) + { + CHelper.GetValueFromXML("//root/Game/Players/Player" + i.ToString(), navigator, ref Players[i-1], string.Empty); + } + #endregion Game #region Video @@ -577,6 +584,13 @@ namespace Vocaluxe.Base writer.WriteComment("Lyrics also on Top of screen: " + ListStrings(Enum.GetNames(typeof(EOffOn)))); writer.WriteElementString("LyricsOnTop", Enum.GetName(typeof(EOffOn), LyricsOnTop)); + writer.WriteComment("Default profile for players 1..." + CSettings.MaxNumPlayer.ToString() + ":"); + writer.WriteStartElement("Players"); + for (int i = 1; i <= CSettings.MaxNumPlayer; i++) + { + writer.WriteElementString("Player" + i.ToString(), Path.GetFileName(Players[i - 1])); + } + writer.WriteEndElement(); #endregion Game @@ -945,6 +959,29 @@ namespace Vocaluxe.Base return _Result; } + /// + /// Use saved players from config now for games + /// + public static void UsePlayers() + { + for (int i = 0; i < CProfiles.Profiles.Length; i++) + { + for (int j = 0; j < CSettings.MaxNumPlayer; j++) + { + if (Players[j] != string.Empty) + { + if (Path.GetFileName(CProfiles.Profiles[i].ProfileFile) == Players[j]) + { + //Update Game-infos with player + CGame.Player[j].Name = CProfiles.Profiles[i].PlayerName; + CGame.Player[j].Difficulty = CProfiles.Profiles[i].Difficulty; + CGame.Player[j].ProfileID = i; + } + } + } + } + } + } diff --git a/Vocaluxe/Base/CGame.cs b/Vocaluxe/Base/CGame.cs index 9c2b6c7d..6e28f029 100644 --- a/Vocaluxe/Base/CGame.cs +++ b/Vocaluxe/Base/CGame.cs @@ -102,6 +102,8 @@ namespace Vocaluxe.Base _GameMode.Init(); _Player = new SPlayer[CSettings.MaxNumPlayer]; ResetPlayer(); + + CConfig.UsePlayers(); } public static void SetGameMode(EGameMode Mode) diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index a78e970e..5870f267 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -133,6 +133,9 @@ namespace Vocaluxe.Screens CGame.Player[selectingKeyboardPlayerNr-1].Name = CProfiles.Profiles[SelectedPlayerNr].PlayerName; CGame.Player[selectingKeyboardPlayerNr-1].Difficulty = CProfiles.Profiles[SelectedPlayerNr].Difficulty; CGame.Player[selectingKeyboardPlayerNr-1].ProfileID = SelectedPlayerNr; + //Update config for default players. + CConfig.Players[selectingKeyboardPlayerNr - 1] = CProfiles.Profiles[SelectedPlayerNr].ProfileFile; + CConfig.SaveConfig(); //Update texture and name Statics[htStatics(StaticPlayerAvatar[selectingKeyboardPlayerNr-1])].Texture = NameSelections[htNameSelections(NameSelection)].TilePlayerAvatar(SelectedPlayerNr).Texture; Texts[htTexts(TextPlayer[selectingKeyboardPlayerNr-1])].Text = CProfiles.Profiles[SelectedPlayerNr].PlayerName; @@ -372,6 +375,9 @@ namespace Vocaluxe.Screens CGame.Player[i].Name = CProfiles.Profiles[SelectedPlayerNr].PlayerName; CGame.Player[i].Difficulty = CProfiles.Profiles[SelectedPlayerNr].Difficulty; CGame.Player[i].ProfileID = SelectedPlayerNr; + //Update config for default players. + 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; @@ -442,6 +448,13 @@ namespace Vocaluxe.Screens UpdateSlides(); UpdatePlayerNumber(); CheckMics(); + + for (int i = 0; i < CSettings.MaxNumPlayer; i++) + { + //Update texture and name + 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; + } } public override bool Draw() From 4ee2e887c23d0e77a6bd1fe3687a6cf2c7c71c85 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Mon, 9 Apr 2012 11:24:57 +0200 Subject: [PATCH 23/42] Fix drag/drop texture - Thx brunzel! --- Vocaluxe/Screens/CScreenNames.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index 5870f267..8be6c2f9 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -340,7 +340,7 @@ namespace Vocaluxe.Screens CStatic SelectedPlayer = NameSelections[htNameSelections(NameSelection)].TilePlayerAvatar(MouseEvent); chooseAvatarStatic.Visible = true; chooseAvatarStatic.Rect = SelectedPlayer.Rect; - chooseAvatarStatic.Rect.Z = CSettings.zNear - 5; + chooseAvatarStatic.Rect.Z = CSettings.zNear + 1; chooseAvatarStatic.Color = new SColorF(1, 1, 1, 1); chooseAvatarStatic.Texture = SelectedPlayer.Texture; } From 6e6eeab0aa2d97196348ecc1fceae84f6669ca7c Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Mon, 9 Apr 2012 12:48:16 +0200 Subject: [PATCH 24/42] Fix bug with saving config. --- Vocaluxe/Base/CConfig.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index 66dfa6b7..152d4cb3 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -590,6 +590,7 @@ namespace Vocaluxe.Base { writer.WriteElementString("Player" + i.ToString(), Path.GetFileName(Players[i - 1])); } + writer.WriteEndElement(); writer.WriteEndElement(); #endregion Game From 85b16e5f32677b2587b5c5e3145a11fc6d9a5606 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Mon, 9 Apr 2012 14:01:22 +0200 Subject: [PATCH 25/42] Added warning if not all players has a profile... --- Output/Languages/Deutsch.xml | 6 +- Output/Languages/English.xml | 6 +- Output/Languages/French.xml | 6 +- Output/Languages/Spanish.xml | 6 +- Output/Themes/Ambient/Screens/ScreenNames.xml | 52 ++++++++++- .../Changelog/Changelog_ScreenNames.txt | 9 +- Vocaluxe/Base/CConfig.cs | 4 + Vocaluxe/Screens/CScreenNames.cs | 86 ++++++++++++++++--- 8 files changed, 149 insertions(+), 26 deletions(-) diff --git a/Output/Languages/Deutsch.xml b/Output/Languages/Deutsch.xml index 1593fd3b..3a43f076 100644 --- a/Output/Languages/Deutsch.xml +++ b/Output/Languages/Deutsch.xml @@ -108,8 +108,10 @@ 4 Spieler 5 Spieler 6 Spieler - Warnung: Dem Spieler %v ist kein Mikrofon zugeordnet! - Warnung: Den Spielern %v sind keine Mikrofone zugeordnet! + Warnung: Dem Spieler %v ist kein Mikrofon zugeordnet! + Warnung: Den Spielern %v sind keine Mikrofone zugeordnet! + Warnung: Dem Spieler %v ist kein Profil zugeordnet! + Warnung: Den Spielern %v sind keine Profile zugeordnet! Songauswahl Suche: diff --git a/Output/Languages/English.xml b/Output/Languages/English.xml index 59a81e1e..8c614755 100644 --- a/Output/Languages/English.xml +++ b/Output/Languages/English.xml @@ -108,8 +108,10 @@ 4 Player 5 Player 6 Player - Warning: There is no mic assigned to player %v! - Warning: There are no mics assigned to players %v! + Warning: There is no mic assigned to player %v! + Warning: There are no mics assigned to players %v! + Warning: There is no profile assigned to player %v! + Warning: There are no profiles assigned to players %v! Song Selection Search: diff --git a/Output/Languages/French.xml b/Output/Languages/French.xml index 8021012d..fd2c6fac 100644 --- a/Output/Languages/French.xml +++ b/Output/Languages/French.xml @@ -108,8 +108,10 @@ 4 joueurs 5 joueurs 6 joueurs - Attention: Aucun micro n'est assigné au joueur %v! - Attention: Aucun micro n'est assigné aux joueurs %v! + Attention: Aucun micro n'est assigné au joueur %v! + Attention: Aucun micro n'est assigné aux joueurs %v! + Attention: Aucun profil n'est assigné au joueur %v! + Attention: Aucun profils n'est assigné aux joueurs %v! Choix de la chanson Rechercher: diff --git a/Output/Languages/Spanish.xml b/Output/Languages/Spanish.xml index a0600e84..6e06dc0b 100644 --- a/Output/Languages/Spanish.xml +++ b/Output/Languages/Spanish.xml @@ -108,8 +108,10 @@ Jugador 4 Jugador 5 Jugador 6 - Advertencia: ¡No hay micrófonos asignados al jugador %v! - Advertencia: ¡No hay micrófonos asignados a los jugadores %v! + Advertencia: ¡No hay micrófonos asignados al jugador %v! + Advertencia: ¡No hay micrófonos asignados a los jugadores %v! + Advertencia: ¡No hay perfil asignados al jugador %v! + Advertencia: ¡No hay perfiles asignados a los jugadores %v! Selección de Canciones Buscar: diff --git a/Output/Themes/Ambient/Screens/ScreenNames.xml b/Output/Themes/Ambient/Screens/ScreenNames.xml index 8b8ae42a..9b9cd572 100644 --- a/Output/Themes/Ambient/Screens/ScreenNames.xml +++ b/Output/Themes/Ambient/Screens/ScreenNames.xml @@ -221,7 +221,7 @@ - + Invisible @@ -236,7 +236,23 @@ - + + + + Invisible + + 145 + 715 + 0,00 + 990 + 50 + + + StaticWarningColor + + + + 640 @@ -426,7 +442,7 @@ - + 640 615 @@ -453,7 +469,35 @@ - + + + + 640 + 650 + + 0,00 + + 32 + + 970 + + + TextWarningColor + + + TextWarningColor + + Center + + + + Outline + + + + + + Button diff --git a/Output/Themes/Changelog/Changelog_ScreenNames.txt b/Output/Themes/Changelog/Changelog_ScreenNames.txt index e4613ca9..47d04016 100644 --- a/Output/Themes/Changelog/Changelog_ScreenNames.txt +++ b/Output/Themes/Changelog/Changelog_ScreenNames.txt @@ -5,13 +5,18 @@ Version 2: Add: - A new Theme-element for name-selecting. (One Static for each player): Static wich is used as drop-area (One Static for each player): Static wich shows the avatar of selected player (One Text for each player): Text wich shows name of selected player + + + +Rename: + to + to Remove: -, , , , , \ No newline at end of file +, , , , , diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index 152d4cb3..a1d83a61 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -979,6 +979,10 @@ namespace Vocaluxe.Base CGame.Player[j].ProfileID = i; } } + else + { + CGame.Player[j].ProfileID = -1; + } } } } diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index 8be6c2f9..0e0a0e93 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -22,8 +22,10 @@ namespace Vocaluxe.Screens private const string NameSelection = "NameSelection"; private const string ButtonBack = "ButtonBack"; private const string ButtonStart = "ButtonStart"; - private const string TextWarning = "TextWarning"; - private const string StaticWarning = "StaticWarning"; + private const string TextWarningMics = "TextWarningMics"; + private const string StaticWarningMics = "StaticWarningMics"; + private const string TextWarningProfiles = "TextWarningProfiles"; + private const string StaticWarningProfiles = "StaticWarningProfiles"; private readonly string[] StaticPlayer = new string[] { "StaticPlayer1", "StaticPlayer2", "StaticPlayer3", "StaticPlayer4", "StaticPlayer5", "StaticPlayer6" }; private readonly string[] StaticPlayerAvatar = new string[] { "StaticPlayerAvatar1", "StaticPlayerAvatar2", "StaticPlayerAvatar3", "StaticPlayerAvatar4", "StaticPlayerAvatar5", "StaticPlayerAvatar6" }; private readonly string[] TextPlayer = new string[] { "TextPlayer1", "TextPlayer2", "TextPlayer3", "TextPlayer4", "TextPlayer5", "TextPlayer6" }; @@ -56,7 +58,8 @@ namespace Vocaluxe.Screens { statics.Add(text); } - statics.Add(StaticWarning); + statics.Add(StaticWarningMics); + statics.Add(StaticWarningProfiles); _ThemeStatics = statics.ToArray(); List texts = new List(); @@ -64,7 +67,8 @@ namespace Vocaluxe.Screens _ThemeSelectSlides = new string[] { SelectSlidePlayerNumber }; texts.Clear(); - texts.Add(TextWarning); + texts.Add(TextWarningMics); + texts.Add(TextWarningProfiles); foreach(string text in TextPlayer){ texts.Add(text); } @@ -139,6 +143,8 @@ namespace Vocaluxe.Screens //Update texture and name Statics[htStatics(StaticPlayerAvatar[selectingKeyboardPlayerNr-1])].Texture = NameSelections[htNameSelections(NameSelection)].TilePlayerAvatar(SelectedPlayerNr).Texture; Texts[htTexts(TextPlayer[selectingKeyboardPlayerNr-1])].Text = CProfiles.Profiles[SelectedPlayerNr].PlayerName; + //Update profile-warning + CheckPlayers(); } //Reset all values selectingKeyboardPlayerNr = 0; @@ -381,6 +387,8 @@ namespace Vocaluxe.Screens //Update texture and name Statics[htStatics(StaticPlayerAvatar[i])].Texture = chooseAvatarStatic.Texture; Texts[htTexts(TextPlayer[i])].Text = CProfiles.Profiles[SelectedPlayerNr].PlayerName; + //Update profile-warning + CheckPlayers(); } } } @@ -448,12 +456,16 @@ namespace Vocaluxe.Screens UpdateSlides(); UpdatePlayerNumber(); CheckMics(); + CheckPlayers(); for (int i = 0; i < CSettings.MaxNumPlayer; i++) { //Update texture and name - 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; + if (CConfig.Players[i] != String.Empty) + { + 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; + } } } @@ -527,6 +539,7 @@ namespace Vocaluxe.Screens } CConfig.SaveConfig(); CheckMics(); + CheckPlayers(); } private void CheckMics() @@ -541,8 +554,8 @@ namespace Vocaluxe.Screens } if (_PlayerWithoutMicro.Count > 0) { - Statics[htStatics(StaticWarning)].Visible = true; - Texts[htTexts(TextWarning)].Visible = true; + Statics[htStatics(StaticWarningMics)].Visible = true; + Texts[htTexts(TextWarningMics)].Visible = true; if (_PlayerWithoutMicro.Count > 1) { @@ -563,17 +576,66 @@ namespace Vocaluxe.Screens } } - Texts[htTexts(TextWarning)].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_PL").Replace("%v", PlayerNums); + Texts[htTexts(TextWarningMics)].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_MICS_PL").Replace("%v", PlayerNums); } else { - Texts[htTexts(TextWarning)].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_SG").Replace("%v", _PlayerWithoutMicro[0].ToString()); + Texts[htTexts(TextWarningMics)].Text = CLanguage.Translate("TR_SCREENNAMES_WARNING_MICS_SG").Replace("%v", _PlayerWithoutMicro[0].ToString()); } } else { - Statics[htStatics(StaticWarning)].Visible = false; - Texts[htTexts(TextWarning)].Visible = false; + Statics[htStatics(StaticWarningMics)].Visible = false; + Texts[htTexts(TextWarningMics)].Visible = false; + } + } + + private void CheckPlayers() + { + List _PlayerWithoutProfile = new List(); + for (int player = 0; player < CConfig.NumPlayer; player++) + { + if (CGame.Player[player].ProfileID < 0) + { + _PlayerWithoutProfile.Add(player + 1); + } + } + + if (_PlayerWithoutProfile.Count > 0) + { + Statics[htStatics(StaticWarningProfiles)].Visible = true; + Texts[htTexts(TextWarningProfiles)].Visible = true; + + if (_PlayerWithoutProfile.Count > 1) + { + string PlayerNums = string.Empty; + for (int i = 0; i < _PlayerWithoutProfile.Count; i++) + { + if (_PlayerWithoutProfile.Count - 1 == i) + { + PlayerNums += _PlayerWithoutProfile[i].ToString(); + } + else if (_PlayerWithoutProfile.Count - 2 == i) + { + PlayerNums += _PlayerWithoutProfile[i].ToString() + " " + CLanguage.Translate("TR_GENERAL_AND") + " "; + } + else + { + PlayerNums += _PlayerWithoutProfile[i].ToString() + ", "; + } + } + + Texts[htTexts(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()); + } + } + else + { + Statics[htStatics(StaticWarningProfiles)].Visible = false; + Texts[htTexts(TextWarningProfiles)].Visible = false; } } } From 6e8eec82c1fba33c21b365c6cb4d21d3a8103a48 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Mon, 9 Apr 2012 14:23:08 +0200 Subject: [PATCH 26/42] Remove profile-selection with right-click on avatar or [1...6] and [Del]. --- Vocaluxe/Screens/CScreenNames.cs | 51 ++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index 0e0a0e93..9f61948c 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -29,12 +29,12 @@ namespace Vocaluxe.Screens private readonly string[] StaticPlayer = new string[] { "StaticPlayer1", "StaticPlayer2", "StaticPlayer3", "StaticPlayer4", "StaticPlayer5", "StaticPlayer6" }; private readonly string[] StaticPlayerAvatar = new string[] { "StaticPlayerAvatar1", "StaticPlayerAvatar2", "StaticPlayerAvatar3", "StaticPlayerAvatar4", "StaticPlayerAvatar5", "StaticPlayerAvatar6" }; private readonly string[] TextPlayer = new string[] { "TextPlayer1", "TextPlayer2", "TextPlayer3", "TextPlayer4", "TextPlayer5", "TextPlayer6" }; + private STexture[] OriginalPlayerAvatarTextures = new STexture[CSettings.MaxNumPlayer]; private bool selectingMouseActive = false; private bool selectingKeyboardActive = false; private int selectingKeyboardPlayerNr = 0; private int SelectedPlayerNr; - private int[] _PlayerNr; @@ -97,6 +97,11 @@ namespace Vocaluxe.Screens { _PlayerNr[i] = i; } + + for (int i = 0; i < CSettings.MaxNumPlayer; i++) + { + OriginalPlayerAvatarTextures[i] = Statics[htStatics(StaticPlayerAvatar[i])].Texture; + } } public override bool HandleInput(KeyEvent KeyEvent) @@ -248,6 +253,26 @@ namespace Vocaluxe.Screens selectingKeyboardActive = false; NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1); break; + + case Keys.Delete: + //Delete profile-selection + CGame.Player[selectingKeyboardPlayerNr-1].ProfileID = -1; + CGame.Player[selectingKeyboardPlayerNr-1].Name = String.Empty; + CGame.Player[selectingKeyboardPlayerNr-1].Difficulty = EGameDifficulty.TR_CONFIG_EASY; + //Update config for default players. + 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(); + //Update profile-warning + CheckPlayers(); + //Reset all values + selectingKeyboardPlayerNr = 0; + selectingKeyboardActive = false; + NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1); + break; + } } //Normal Keyboard handling @@ -426,7 +451,29 @@ namespace Vocaluxe.Screens if (MouseEvent.RB) { - CGraphics.FadeTo(EScreens.ScreenSong); + + bool exit = true; + //Remove profile-selection + for (int i = 0; i < CConfig.NumPlayer; i++) + { + if (CHelper.IsInBounds(Statics[htStatics(StaticPlayer[i])].Rect, MouseEvent)) + { + CGame.Player[i].ProfileID = -1; + CGame.Player[i].Name = String.Empty; + CGame.Player[i].Difficulty = EGameDifficulty.TR_CONFIG_EASY; + //Update config for default players. + 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(); + //Update profile-warning + CheckPlayers(); + exit = false; + } + } + if(exit) + CGraphics.FadeTo(EScreens.ScreenSong); } //Check mouse-wheel for scrolling From f9e516eb7b0d4057538058c4822f8851174f2d8b Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Tue, 10 Apr 2012 13:30:38 +0200 Subject: [PATCH 27/42] New design for sing-screen. Thx to jackroke for this idea! --- Output/Themes/Ambient/Screens/ScreenSing.xml | 314 +++++++++---------- Output/Themes/Ambient/Skin Blue.xml | 36 +++ Output/Themes/Ambient/Skin Green.xml | 36 +++ Output/Themes/Ambient/Skin Red.xml | 36 +++ Output/Themes/Ambient/Skin Yellow.xml | 36 +++ Vocaluxe/Menu/SingNotes/CSingNotes.cs | 2 +- Vocaluxe/Screens/CScreenSing.cs | 11 +- 7 files changed, 311 insertions(+), 160 deletions(-) diff --git a/Output/Themes/Ambient/Screens/ScreenSing.xml b/Output/Themes/Ambient/Screens/ScreenSing.xml index 147713db..1c508212 100644 --- a/Output/Themes/Ambient/Screens/ScreenSing.xml +++ b/Output/Themes/Ambient/Screens/ScreenSing.xml @@ -17,10 +17,10 @@ Score 190 - 10 - -1,00 + 694 + -1,10 900 - 50 + 25 StaticColor @@ -222,7 +222,7 @@ 0 0 - -1,10 + -2,10 1280 720 @@ -234,7 +234,7 @@ - Score + Invisible 1150 350 @@ -250,7 +250,7 @@ - Score + Invisible 1150 150 @@ -266,7 +266,7 @@ - Score + Invisible 1150 350 @@ -282,7 +282,7 @@ - Score + Invisible 1150 10 @@ -298,7 +298,7 @@ - Score + Invisible 1150 210 @@ -314,7 +314,7 @@ - Score + Invisible 1150 410 @@ -330,7 +330,7 @@ - Score + Invisible 528 150 @@ -346,7 +346,7 @@ - Score + Invisible 528 350 @@ -362,7 +362,7 @@ - Score + Invisible 1150 150 @@ -378,7 +378,7 @@ - Score + Invisible 1150 350 @@ -394,7 +394,7 @@ - Score + Invisible 528 10 @@ -410,7 +410,7 @@ - Score + Invisible 528 210 @@ -426,7 +426,7 @@ - Score + Invisible 528 410 @@ -442,7 +442,7 @@ - Score + Invisible 1150 150 @@ -458,7 +458,7 @@ - Score + Invisible 1150 350 @@ -474,7 +474,7 @@ - Score + Invisible 528 10 @@ -490,7 +490,7 @@ - Score + Invisible 528 210 @@ -506,7 +506,7 @@ - Score + Invisible 528 410 @@ -522,7 +522,7 @@ - Score + Invisible 1150 10 @@ -538,7 +538,7 @@ - Score + Invisible 1150 210 @@ -554,7 +554,7 @@ - Score + Invisible 1150 410 @@ -571,11 +571,11 @@ 640 - 18 + 695 - -1,00 + -1,10 - 32 + 23 880 @@ -628,7 +628,7 @@ 640 170 - -1,11 + -2,11 100 @@ -652,21 +652,21 @@ - 1200 + 1240 355 -1,00 - 40 + 198 - Player1 + Player1Dim2 TextSColor - Center + Right @@ -679,21 +679,21 @@ - 1200 + 1240 155 -1,00 - 40 + 173 - Player1 + Player1Dim2 Player1 - Center + Right @@ -706,21 +706,21 @@ - 1200 + 1240 355 -1,00 - 40 + 173 - Player2 + Player2Dim2 Player2 - Center + Right @@ -733,21 +733,21 @@ - 1200 - 15 + 1240 + 106 -1,00 - 40 + 158 - Player1 + Player1Dim2 Player1 - Center + Right @@ -760,21 +760,21 @@ - 1200 - 215 + 1240 + 269 -1,00 - 40 + 158 - Player2 + Player2Dim2 Player2 - Center + Right @@ -787,21 +787,21 @@ - 1200 - 415 + 1240 + 437 -1,00 - 40 + 158 - Player3 + Player3Dim2 Player3 - Center + Right @@ -814,16 +814,16 @@ - 578 + 324 155 -1,00 - 40 + 173 - Player1 + Player1Dim2 Player1 @@ -841,16 +841,16 @@ - 578 + 324 355 -1,00 - 40 + 173 - Player2 + Player2Dim2 Player2 @@ -868,16 +868,16 @@ - 1200 + 967 155 -1,00 - 40 + 173 - Player3 + Player3Dim2 Player3 @@ -895,16 +895,16 @@ - 1200 + 967 355 -1,00 - 40 + 173 - Player4 + Player4Dim2 Player4 @@ -922,16 +922,16 @@ - 578 - 15 + 324 + 106 -1,00 - 40 + 158 - Player1 + Player1Dim2 Player1 @@ -949,16 +949,16 @@ - 578 - 215 + 324 + 269 -1,00 - 40 + 158 - Player2 + Player2Dim2 Player2 @@ -976,16 +976,16 @@ - 578 - 415 + 324 + 437 -1,00 - 40 + 158 - Player3 + Player3Dim2 Player3 @@ -1003,16 +1003,16 @@ - 1200 + 967 155 -1,00 - 40 + 173 - Player4 + Player4Dim2 Player4 @@ -1030,16 +1030,16 @@ - 1200 + 967 355 -1,00 - 40 + 173 - Player5 + Player5Dim2 Player5 @@ -1057,16 +1057,16 @@ - 578 - 15 + 324 + 106 -1,00 - 40 + 158 - Player1 + Player1Dim2 Player1 @@ -1084,16 +1084,16 @@ - 578 - 215 + 324 + 269 -1,00 - 40 + 158 - Player2 + Player2Dim2 Player2 @@ -1111,16 +1111,16 @@ - 578 - 415 + 324 + 437 -1,00 - 40 + 158 - Player3 + Player3Dim2 Player3 @@ -1138,16 +1138,16 @@ - 1200 - 15 + 967 + 106 -1,00 - 40 + 158 - Player4 + Player4Dim2 Player4 @@ -1165,16 +1165,16 @@ - 1200 - 215 + 967 + 269 -1,00 - 40 + 158 - Player5 + Player5Dim2 Player5 @@ -1192,16 +1192,16 @@ - 1200 - 415 + 967 + 437 -1,00 - 40 + 158 - Player6 + Player6Dim2 Player6 @@ -1225,7 +1225,7 @@ 670 300 - -1,11 + -2,11 150 50 @@ -1280,7 +1280,7 @@ 460 300 - -1,11 + -2,11 150 50 @@ -1436,109 +1436,109 @@ 35 350 - -0,50 + -1,50 1210 200 35 150 - -0,50 + -1,50 1210 175 35 350 - -0,50 + -1,50 1210 175 35 - 10 - -0,50 + 105 + -1,50 1210 - 150 + 160 35 - 210 - -0,50 + 268 + -1,50 1210 - 150 + 160 35 - 410 - -0,50 + 436 + -1,50 1210 - 150 + 160 35 150 - -0,50 + -1,50 578 175 35 350 - -0,50 + -1,50 578 175 678 150 - -0,50 + -1,50 578 175 678 350 - -0,50 + -1,50 578 175 35 - 10 - -0,50 + 105 + -1,50 578 - 150 + 160 35 - 210 - -0,50 + 268 + -1,50 578 - 150 + 160 35 - 410 - -0,50 + 436 + -1,50 578 - 150 + 160 678 150 - -0,50 + -1,50 578 175 678 350 - -0,50 + -1,50 578 175 35 - 10 - -0,50 + 105 + -1,50 578 - 150 + 160 35 - 210 - -0,50 + 268 + -1,50 578 - 150 + 160 35 - 410 - -0,50 + 436 + -1,50 578 - 150 + 160 678 - 10 - -0,50 + 105 + -1,50 578 - 150 + 160 678 - 210 - -0,50 + 268 + -1,50 578 - 150 + 160 678 - 410 - -0,50 + 436 + -1,50 578 - 150 + 160 diff --git a/Output/Themes/Ambient/Skin Blue.xml b/Output/Themes/Ambient/Skin Blue.xml index 0be63f4b..80bdb88c 100644 --- a/Output/Themes/Ambient/Skin Blue.xml +++ b/Output/Themes/Ambient/Skin Blue.xml @@ -82,6 +82,42 @@ 0,500 0,500 + + 0,000 + 0,000 + 1,000 + 0,400 + + + 1,000 + 0,000 + 0,000 + 0,400 + + + 0,000 + 1,000 + 0,000 + 0,400 + + + 0,500 + 0,000 + 1,000 + 0,400 + + + 1,000 + 0,800 + 0,000 + 0,400 + + + 1,000 + 0,000 + 0,500 + 0,400 + 0,000 0,000 diff --git a/Output/Themes/Ambient/Skin Green.xml b/Output/Themes/Ambient/Skin Green.xml index 11ad8556..095e1243 100644 --- a/Output/Themes/Ambient/Skin Green.xml +++ b/Output/Themes/Ambient/Skin Green.xml @@ -82,6 +82,42 @@ 0,500 0,500 + + 0,000 + 0,000 + 1,000 + 0,400 + + + 1,000 + 0,000 + 0,000 + 0,400 + + + 0,000 + 1,000 + 0,000 + 0,400 + + + 0,500 + 0,000 + 1,000 + 0,400 + + + 1,000 + 0,800 + 0,000 + 0,400 + + + 1,000 + 0,000 + 0,500 + 0,400 + 0,000 0,000 diff --git a/Output/Themes/Ambient/Skin Red.xml b/Output/Themes/Ambient/Skin Red.xml index e00b17a7..c92cceda 100644 --- a/Output/Themes/Ambient/Skin Red.xml +++ b/Output/Themes/Ambient/Skin Red.xml @@ -82,6 +82,42 @@ 0,500 0,500 + + 0,000 + 0,000 + 1,000 + 0,400 + + + 1,000 + 0,000 + 0,000 + 0,400 + + + 0,000 + 1,000 + 0,000 + 0,400 + + + 0,500 + 0,000 + 1,000 + 0,400 + + + 1,000 + 0,800 + 0,000 + 0,400 + + + 1,000 + 0,000 + 0,500 + 0,400 + 0,000 0,000 diff --git a/Output/Themes/Ambient/Skin Yellow.xml b/Output/Themes/Ambient/Skin Yellow.xml index f6065aa7..fbc4a227 100644 --- a/Output/Themes/Ambient/Skin Yellow.xml +++ b/Output/Themes/Ambient/Skin Yellow.xml @@ -82,6 +82,42 @@ 0,500 0,500 + + 0,000 + 0,000 + 1,000 + 0,400 + + + 1,000 + 0,000 + 0,000 + 0,400 + + + 0,000 + 1,000 + 0,000 + 0,400 + + + 0,500 + 0,000 + 1,000 + 0,400 + + + 1,000 + 0,800 + 0,000 + 0,400 + + + 1,000 + 0,000 + 0,500 + 0,400 + 0,000 0,000 diff --git a/Vocaluxe/Menu/SingNotes/CSingNotes.cs b/Vocaluxe/Menu/SingNotes/CSingNotes.cs index a157e9fa..006e7369 100644 --- a/Vocaluxe/Menu/SingNotes/CSingNotes.cs +++ b/Vocaluxe/Menu/SingNotes/CSingNotes.cs @@ -583,7 +583,7 @@ namespace Vocaluxe.Menu.SingNotes for (int i = 0; i < CSettings.NumNoteLines - 1; i++) { float y = Rect.Y + Rect.H / CSettings.NumNoteLines * (i + 1); - CDraw.DrawColor(Color, new SRectF(Rect.X, y, Rect.W, 1, -0.5f)); + CDraw.DrawColor(Color, new SRectF(Rect.X, y, Rect.W, 1, -1.0f)); } } diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index 7152d80d..08a9220a 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -290,7 +290,14 @@ namespace Vocaluxe.Screens for (int p = 0; p < CGame.NumPlayer; p++) { - Texts[htTexts(TextScores[p, CGame.NumPlayer - 1])].Text = CGame.Player[p].Points.ToString("00000"); + if (CGame.Player[p].Points < 10000) + { + Texts[htTexts(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"); + } } if (_CurrentVideo != -1 && !_FadeOut && CConfig.VideosInSongs == EOffOn.TR_CONFIG_ON) @@ -496,7 +503,7 @@ namespace Vocaluxe.Screens SingNotes[htSingNotes(SingBars)].Reset(); - bool LyricsOnTop = (CGame.NumPlayer == 2 || CGame.NumPlayer == 4) && CConfig.LyricsOnTop == EOffOn.TR_CONFIG_ON; + bool LyricsOnTop = (CGame.NumPlayer != 1) && CConfig.LyricsOnTop == EOffOn.TR_CONFIG_ON; if (song.IsDuet) { CGame.Player[1].LineNr = 1; From c004d68a6971d9f90f876bbed51f9144d5dd652b Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Tue, 10 Apr 2012 15:51:31 +0200 Subject: [PATCH 28/42] Added playeravatar and -name to SingScreen. Toggle with "I"! --- Output/Themes/Ambient/Screens/ScreenSing.xml | 1105 ++++++++++++++++- .../Themes/Changelog/Changelog_ScreenSing.txt | 4 + Vocaluxe/Base/CConfig.cs | 13 + Vocaluxe/Screens/CScreenSing.cs | 57 + 4 files changed, 1141 insertions(+), 38 deletions(-) diff --git a/Output/Themes/Ambient/Screens/ScreenSing.xml b/Output/Themes/Ambient/Screens/ScreenSing.xml index 1c508212..5a9c9359 100644 --- a/Output/Themes/Ambient/Screens/ScreenSing.xml +++ b/Output/Themes/Ambient/Screens/ScreenSing.xml @@ -17,10 +17,10 @@ Score 190 - 694 - -1,10 + 10 + -1,00 900 - 25 + 50 StaticColor @@ -49,7 +49,7 @@ Lyrics 40 - 15 + 7 -0,75 1200 93 @@ -65,7 +65,7 @@ Lyrics 40 - 15 + 7 -0,75 1200 93 @@ -183,7 +183,7 @@ LyricHelper 40 - 20 + 12 -1,00 45 45 @@ -202,7 +202,7 @@ LyricHelper 40 - 20 + 12 -1,00 45 45 @@ -232,6 +232,405 @@ + + + Invisible + + 40 + 360 + -0,75 + 190 + 190 + + + 1,000 + 1,000 + 1,000 + 0,400 + + + + + + + Invisible + + 40 + 160 + -0,75 + 165 + 165 + + + 1,000 + 1,000 + 1,000 + 0,400 + + + + + + + Invisible + + 40 + 360 + -0,75 + 165 + 165 + + + 1,000 + 1,000 + 1,000 + 0,400 + + + + + + + Invisible + + 40 + 111 + -0,75 + 140 + 140 + + + 1,000 + 1,000 + 1,000 + 0,400 + + + + + + + Invisible + + 40 + 274 + -0,75 + 140 + 140 + + + 1,000 + 1,000 + 1,000 + 0,400 + + + + + + + Invisible + + 40 + 442 + -0,75 + 140 + 140 + + + 1,000 + 1,000 + 1,000 + 0,400 + + + + + + + Invisible + + 40 + 160 + -0,75 + 165 + 165 + + + 1,000 + 1,000 + 1,000 + 0,400 + + + + + + + Invisible + + 40 + 360 + -0,75 + 165 + 165 + + + 1,000 + 1,000 + 1,000 + 0,400 + + + + + + + Invisible + + 1103 + 160 + -0,75 + 165 + 165 + + + 1,000 + 1,000 + 1,000 + 0,400 + + + + + + + Invisible + + 1103 + 360 + -0,75 + 165 + 165 + + + 1,000 + 1,000 + 1,000 + 0,400 + + + + + + + Invisible + + 40 + 111 + -0,75 + 140 + 140 + + + 1,000 + 1,000 + 1,000 + 0,400 + + + + + + + Invisible + + 40 + 274 + -0,75 + 140 + 140 + + + 1,000 + 1,000 + 1,000 + 0,400 + + + + + + + Invisible + + 40 + 442 + -0,75 + 140 + 140 + + + 1,000 + 1,000 + 1,000 + 0,400 + + + + + + + Invisible + + 1103 + 160 + -0,75 + 165 + 165 + + + 1,000 + 1,000 + 1,000 + 0,400 + + + + + + + Invisible + + 1103 + 360 + -0,75 + 165 + 165 + + + 1,000 + 1,000 + 1,000 + 0,400 + + + + + + + Invisible + + 40 + 111 + -0,75 + 140 + 140 + + + 1,000 + 1,000 + 1,000 + 0,400 + + + + + + + Invisible + + 40 + 274 + -0,75 + 140 + 140 + + + 1,000 + 1,000 + 1,000 + 0,400 + + + + + + + Invisible + + 40 + 442 + -0,75 + 140 + 140 + + + 1,000 + 1,000 + 1,000 + 0,400 + + + + + + + Invisible + + 1103 + 111 + -0,75 + 140 + 140 + + + 1,000 + 1,000 + 1,000 + 0,400 + + + + + + + Invisible + + 1103 + 274 + -0,75 + 140 + 140 + + + 1,000 + 1,000 + 1,000 + 0,400 + + + + + + + Invisible + + 1103 + 442 + -0,75 + 140 + 140 + + + 1,000 + 1,000 + 1,000 + 0,400 + + + + Invisible @@ -571,11 +970,11 @@ 640 - 695 + 18 - -1,10 + -1,00 - 23 + 32 880 @@ -738,7 +1137,7 @@ -1,00 - 158 + 148 @@ -765,7 +1164,7 @@ -1,00 - 158 + 148 @@ -792,7 +1191,7 @@ -1,00 - 158 + 148 @@ -927,7 +1326,7 @@ -1,00 - 158 + 148 @@ -954,7 +1353,7 @@ -1,00 - 158 + 148 @@ -981,7 +1380,7 @@ -1,00 - 158 + 148 @@ -1062,7 +1461,7 @@ -1,00 - 158 + 148 @@ -1089,7 +1488,7 @@ -1,00 - 158 + 148 @@ -1116,7 +1515,7 @@ -1,00 - 158 + 148 @@ -1143,7 +1542,7 @@ -1,00 - 158 + 148 @@ -1170,7 +1569,7 @@ -1,00 - 158 + 148 @@ -1197,7 +1596,7 @@ -1,00 - 158 + 148 @@ -1217,6 +1616,636 @@ + + + 110 + 513 + + -1,00 + + 28 + + + + 1,000 + 1,000 + 1,000 + 0,400 + + + TextSColor + + Center + + + + Outline + + + + + + + + + 110 + 288 + + -1,00 + + 28 + + + + 1,000 + 1,000 + 1,000 + 0,400 + + + Player1 + + Center + + + + Outline + + + + + + + + + 110 + 488 + + -1,00 + + 28 + + + + 1,000 + 1,000 + 1,000 + 0,400 + + + Player2 + + Center + + + + Outline + + + + + + + + + 110 + 219 + + -1,00 + + 28 + + + + 1,000 + 1,000 + 1,000 + 0,400 + + + Player1 + + Center + + + + Outline + + + + + + + + + 110 + 382 + + -1,00 + + 28 + + + + 1,000 + 1,000 + 1,000 + 0,400 + + + Player2 + + Center + + + + Outline + + + + + + + + + 110 + 550 + + -1,00 + + 28 + + + + 1,000 + 1,000 + 1,000 + 0,400 + + + Player3 + + Center + + + + Outline + + + + + + + + + 110 + 288 + + -1,00 + + 28 + + + + 1,000 + 1,000 + 1,000 + 0,400 + + + Player1 + + Center + + + + Outline + + + + + + + + + 110 + 488 + + -1,00 + + 28 + + + + 1,000 + 1,000 + 1,000 + 0,400 + + + Player2 + + Center + + + + Outline + + + + + + + + + 1173 + 288 + + -1,00 + + 28 + + + + 1,000 + 1,000 + 1,000 + 0,400 + + + Player3 + + Center + + + + Outline + + + + + + + + + 1173 + 488 + + -1,00 + + 28 + + + + 1,000 + 1,000 + 1,000 + 0,400 + + + Player4 + + Center + + + + Outline + + + + + + + + + 110 + 219 + + -1,00 + + 28 + + + + 1,000 + 1,000 + 1,000 + 0,400 + + + Player1 + + Center + + + + Outline + + + + + + + + + 110 + 382 + + -1,00 + + 28 + + + + 1,000 + 1,000 + 1,000 + 0,400 + + + Player2 + + Center + + + + Outline + + + + + + + + + 110 + 550 + + -1,00 + + 28 + + + + 1,000 + 1,000 + 1,000 + 0,400 + + + Player3 + + Center + + + + Outline + + + + + + + + + 1173 + 288 + + -1,00 + + 28 + + + + 1,000 + 1,000 + 1,000 + 0,400 + + + Player4 + + Center + + + + Outline + + + + + + + + + 1173 + 488 + + -1,00 + + 28 + + + + 1,000 + 1,000 + 1,000 + 0,400 + + + Player5 + + Center + + + + Outline + + + + + + + + + 110 + 219 + + -1,00 + + 28 + + + + 1,000 + 1,000 + 1,000 + 0,400 + + + Player1 + + Center + + + + Outline + + + + + + + + + 110 + 382 + + -1,00 + + 28 + + + + 1,000 + 1,000 + 1,000 + 0,400 + + + Player2 + + Center + + + + Outline + + + + + + + + + 110 + 550 + + -1,00 + + 28 + + + + 1,000 + 1,000 + 1,000 + 0,400 + + + Player3 + + Center + + + + Outline + + + + + + + + + 1173 + 219 + + -1,00 + + 28 + + + + 1,000 + 1,000 + 1,000 + 0,400 + + + Player4 + + Center + + + + Outline + + + + + + + + + 1173 + 382 + + -1,00 + + 28 + + + + 1,000 + 1,000 + 1,000 + 0,400 + + + Player5 + + Center + + + + Outline + + + + + + + + + 1173 + 550 + + -1,00 + + 28 + + + + 1,000 + 1,000 + 1,000 + 0,400 + + + Player6 + + Center + + + + Outline + + + + + + Button @@ -1358,7 +2387,7 @@ 637 - 20 + 12 -1,00 1200 50 @@ -1372,7 +2401,7 @@ 637 - 62 + 54 -1,00 1200 45 @@ -1386,7 +2415,7 @@ 637 - 20 + 12 -1,00 1200 50 @@ -1400,7 +2429,7 @@ 637 - 62 + 54 -1,00 1200 45 @@ -1453,17 +2482,17 @@ 105 -1,50 1210 - 160 + 150 35 268 -1,50 1210 - 160 + 150 35 436 -1,50 1210 - 160 + 150 35 150 -1,50 @@ -1488,17 +2517,17 @@ 105 -1,50 578 - 160 + 150 35 268 -1,50 578 - 160 + 150 35 436 -1,50 578 - 160 + 150 678 150 -1,50 @@ -1513,32 +2542,32 @@ 105 -1,50 578 - 160 + 150 35 268 -1,50 578 - 160 + 150 35 436 -1,50 578 - 160 + 150 678 105 -1,50 578 - 160 + 150 678 268 -1,50 578 - 160 + 150 678 436 -1,50 578 - 160 + 150 diff --git a/Output/Themes/Changelog/Changelog_ScreenSing.txt b/Output/Themes/Changelog/Changelog_ScreenSing.txt index 467cd165..22c5fa99 100644 --- a/Output/Themes/Changelog/Changelog_ScreenSing.txt +++ b/Output/Themes/Changelog/Changelog_ScreenSing.txt @@ -4,6 +4,10 @@ ScreenSing Version 4: Added Elements for 6-player-singing! +Add: + (One for each player for each player-number> + (One for each player for each player-number> + ++++++++++ Version 3: diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index a1d83a61..081d2305 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -152,6 +152,14 @@ namespace Vocaluxe.Base TR_CONFIG_ONLY_OWN_MUSIC } + public enum EPlayerInfo + { + TR_CONFIG_PLAYERINFO_BOTH, + TR_CONFIG_PLAYERINFO_NAME, + TR_CONFIG_PLAYERINFO_AVATAR, + TR_CONFIG_PLAYERINFO_OFF + } + #endregion Enums static class CConfig @@ -185,6 +193,7 @@ namespace Vocaluxe.Base public static EOffOn DrawNoteLines = EOffOn.TR_CONFIG_ON; public static EOffOn DrawToneHelper = EOffOn.TR_CONFIG_ON; public static ETimerLook TimerLook = ETimerLook.TR_CONFIG_TIMERLOOK_EXPANDED; + public static EPlayerInfo PlayerInfo = EPlayerInfo.TR_CONFIG_PLAYERINFO_BOTH; public static ECoverLoading CoverLoading = ECoverLoading.TR_CONFIG_COVERLOADING_ATSTART; // Sound @@ -301,6 +310,7 @@ namespace Vocaluxe.Base CHelper.TryGetEnumValueFromXML("//root/Theme/DrawNoteLines", navigator, ref DrawNoteLines); CHelper.TryGetEnumValueFromXML("//root/Theme/DrawToneHelper", navigator, ref DrawToneHelper); CHelper.TryGetEnumValueFromXML("//root/Theme/TimerLook", navigator, ref TimerLook); + CHelper.TryGetEnumValueFromXML("//root/Theme/PlayerInfo", navigator, ref PlayerInfo); CHelper.TryGetEnumValueFromXML("//root/Theme/CoverLoading", navigator, ref CoverLoading); #endregion Theme @@ -503,6 +513,9 @@ namespace Vocaluxe.Base writer.WriteComment("Look of timer:" + ListStrings(Enum.GetNames(typeof(ETimerLook)))); writer.WriteElementString("TimerLook", Enum.GetName(typeof(ETimerLook), TimerLook)); + writer.WriteComment("Information about players on SingScreen:" + ListStrings(Enum.GetNames(typeof(EPlayerInfo)))); + writer.WriteElementString("PlayerInfo", Enum.GetName(typeof(EPlayerInfo), PlayerInfo)); + writer.WriteComment("Cover Loading:" + ListStrings(Enum.GetNames(typeof(ECoverLoading)))); writer.WriteElementString("CoverLoading", Enum.GetName(typeof(ECoverLoading), CoverLoading)); diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index 08a9220a..fd0cac43 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -30,6 +30,7 @@ namespace Vocaluxe.Screens private const string TextTime = "TextTime"; private const string TextPause = "TextPause"; private string[,] TextScores; + private string[,] TextNames; private const string StaticSongText = "StaticSongText"; private const string StaticLyrics = "StaticLyrics"; @@ -46,6 +47,7 @@ namespace Vocaluxe.Screens private const string StaticPauseBG = "StaticPauseBG"; private string[,] StaticScores; + private string[,] StaticAvatars; private const string ButtonCancel = "ButtonCancel"; private const string ButtonContinue = "ButtonContinue"; @@ -185,6 +187,19 @@ namespace Vocaluxe.Screens CConfig.TimerMode = (ETimerMode)mode; break; + case Keys.I: + mode = (int)CConfig.PlayerInfo; + + mode++; + if (mode > Enum.GetNames(typeof(EPlayerInfo)).Length - 1) + { + mode = 0; + } + CConfig.PlayerInfo = (EPlayerInfo)mode; + CConfig.SaveConfig(); + SetVisuability(); + break; + case Keys.Enter: if (Buttons[htButtons(ButtonContinue)].Selected && _Pause) TogglePause(); @@ -333,6 +348,8 @@ namespace Vocaluxe.Screens } SetVisuability(); + UpdateAvatars(); + UpdateNames(); CBackgroundMusic.Pause(); } @@ -680,6 +697,7 @@ namespace Vocaluxe.Screens private void BuildTextStrings(ref List texts) { TextScores = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer]; + TextNames = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer]; for (int numplayer = 0; numplayer < CSettings.MaxNumPlayer; numplayer++) { @@ -689,8 +707,10 @@ namespace Vocaluxe.Screens { string target = "P" + (player + 1).ToString() + "N" + (numplayer + 1).ToString(); TextScores[player, numplayer] = "TextScore" + target; + TextNames[player, numplayer] = "TextName" + target; texts.Add(TextScores[player, numplayer]); + texts.Add(TextNames[player, numplayer]); } } } @@ -699,6 +719,7 @@ namespace Vocaluxe.Screens private void BuildStaticStrings(ref List statics) { StaticScores = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer]; + StaticAvatars = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer]; for (int numplayer = 0; numplayer < CSettings.MaxNumPlayer; numplayer++) { @@ -708,8 +729,10 @@ namespace Vocaluxe.Screens { string target = "P" + (player + 1).ToString() + "N" + (numplayer + 1).ToString(); StaticScores[player, numplayer] = "StaticScore" + target; + StaticAvatars[player, numplayer] = "StaticAvatar" + target; statics.Add(StaticScores[player, numplayer]); + statics.Add(StaticAvatars[player, numplayer]); } } } @@ -734,7 +757,11 @@ 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) + && (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) + && (CConfig.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_BOTH || CConfig.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_AVATAR)); } } } @@ -1113,5 +1140,35 @@ namespace Vocaluxe.Screens break; } } + + private void UpdateAvatars() + { + for (int i = 0; i < CGame.NumPlayer; i++) + { + if (CGame.Player[i].ProfileID > -1) + { + Statics[htStatics(StaticAvatars[i, CGame.NumPlayer - 1])].Texture = CProfiles.Profiles[CGame.Player[i].ProfileID].Avatar.Texture; + } + else + { + Statics[htStatics(StaticAvatars[i, CGame.NumPlayer - 1])].Visible = false; + } + } + } + + private void UpdateNames() + { + for (int i = 0; i < CGame.NumPlayer; i++) + { + if (CGame.Player[i].ProfileID > -1) + { + Texts[htTexts(TextNames[i, CGame.NumPlayer - 1])].Text = CProfiles.Profiles[CGame.Player[i].ProfileID].PlayerName; + } + else + { + Texts[htTexts(TextNames[i, CGame.NumPlayer - 1])].Visible = false; + } + } + } } } From 6e590201134175ed48130bc6d2b4de7ef2893333 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Tue, 10 Apr 2012 16:26:02 +0200 Subject: [PATCH 29/42] Added option to fade out player-info. --- Output/Languages/Deutsch.xml | 5 + Output/Languages/English.xml | 5 + .../Ambient/Screens/ScreenOptionsTheme.xml | 116 +++++++++++++++++- Vocaluxe/Base/CConfig.cs | 12 ++ Vocaluxe/Screens/CScreenOptionsTheme.cs | 6 +- Vocaluxe/Screens/CScreenSing.cs | 12 ++ 6 files changed, 151 insertions(+), 5 deletions(-) diff --git a/Output/Languages/Deutsch.xml b/Output/Languages/Deutsch.xml index 3a43f076..a1a1a3fe 100644 --- a/Output/Languages/Deutsch.xml +++ b/Output/Languages/Deutsch.xml @@ -88,6 +88,10 @@ Eigene Musik und Hintergrundmusik Keine eigene Musik Nur eigene Musik + + Alle + Nur Namen und Avatar + Keine Laden @@ -180,6 +184,7 @@ Noten-Linien anzeigen Ton-Helfer anzeigen Aussehen des Timers + Spieler-Infos ein/ausblenden Cover Ladeverhalten Videoeinstellungen diff --git a/Output/Languages/English.xml b/Output/Languages/English.xml index 8c614755..d77f8593 100644 --- a/Output/Languages/English.xml +++ b/Output/Languages/English.xml @@ -88,6 +88,10 @@ Own Music and Background Music No own Music Only own Music + + All + Only names and avatars + Nothing Loading @@ -180,6 +184,7 @@ Show Note-Lines Show Tone-Helper Timer-Look + Fade player-info Cover Loading Behavior Video Options diff --git a/Output/Themes/Ambient/Screens/ScreenOptionsTheme.xml b/Output/Themes/Ambient/Screens/ScreenOptionsTheme.xml index ac972646..55ed1267 100644 --- a/Output/Themes/Ambient/Screens/ScreenOptionsTheme.xml +++ b/Output/Themes/Ambient/Screens/ScreenOptionsTheme.xml @@ -1,7 +1,7 @@  - 2 + 3 Video @@ -141,6 +141,22 @@ + + + Invisible + + 50 + 520 + 0,00 + 460 + 50 + + + StaticColor + + + + 640 @@ -352,11 +368,38 @@ Outline - TR_SCREENOTHEME_COVERLOADING + TR_SCREENOTHEME_FADEINFO + + + 75 + 525 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Left + + + + Outline + + TR_SCREENOTHEME_COVERLOADING + + + + Button @@ -802,7 +845,7 @@ 2 - + Invisible @@ -865,7 +908,72 @@ Bold + 2 + + + + Invisible + + SelectSlideArrowLeft + + SelectSlideArrowRight + + SelectSlide + + SelectSlideArrowLeft + + SelectSlideArrowRight + + SelectSlide + + 500 + 520 + 0,00 + 700 + 50 + + 505 + 525 + 0,00 + 40 + 40 + + 1170 + 525 + 0,00 + 40 + 40 + + + SelectSlideColor + + + SelectSlideSColor + + + SelectSlideHColor + + + ArrowColor + + + ArrowSColor + + + TextColor + + + TextSColor + + 32,00 + + 616,00 + + Outline + + Bold + 1 - \ No newline at end of file + diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index 081d2305..e6300f7e 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -160,6 +160,13 @@ namespace Vocaluxe.Base TR_CONFIG_PLAYERINFO_OFF } + public enum EFadePlayerInfo + { + TR_CONFIG_FADEPLAYERINFO_ALL, + TR_CONFIG_FADEPLAYERINFO_INFO, + TR_CONFIG_FADEPLAYERINFO_OFF + } + #endregion Enums static class CConfig @@ -194,6 +201,7 @@ namespace Vocaluxe.Base public static EOffOn DrawToneHelper = EOffOn.TR_CONFIG_ON; public static ETimerLook TimerLook = ETimerLook.TR_CONFIG_TIMERLOOK_EXPANDED; public static EPlayerInfo PlayerInfo = EPlayerInfo.TR_CONFIG_PLAYERINFO_BOTH; + public static EFadePlayerInfo FadePlayerInfo = EFadePlayerInfo.TR_CONFIG_FADEPLAYERINFO_OFF; public static ECoverLoading CoverLoading = ECoverLoading.TR_CONFIG_COVERLOADING_ATSTART; // Sound @@ -311,6 +319,7 @@ namespace Vocaluxe.Base CHelper.TryGetEnumValueFromXML("//root/Theme/DrawToneHelper", navigator, ref DrawToneHelper); CHelper.TryGetEnumValueFromXML("//root/Theme/TimerLook", navigator, ref TimerLook); CHelper.TryGetEnumValueFromXML("//root/Theme/PlayerInfo", navigator, ref PlayerInfo); + CHelper.TryGetEnumValueFromXML("//root/Theme/FadePlayerInfo", navigator, ref FadePlayerInfo); CHelper.TryGetEnumValueFromXML("//root/Theme/CoverLoading", navigator, ref CoverLoading); #endregion Theme @@ -516,6 +525,9 @@ namespace Vocaluxe.Base writer.WriteComment("Information about players on SingScreen:" + ListStrings(Enum.GetNames(typeof(EPlayerInfo)))); writer.WriteElementString("PlayerInfo", Enum.GetName(typeof(EPlayerInfo), PlayerInfo)); + writer.WriteComment("Fade player-information with lyrics and notebars:" + ListStrings(Enum.GetNames(typeof(EFadePlayerInfo)))); + writer.WriteElementString("FadePlayerInfo", Enum.GetName(typeof(EFadePlayerInfo), FadePlayerInfo)); + writer.WriteComment("Cover Loading:" + ListStrings(Enum.GetNames(typeof(ECoverLoading)))); writer.WriteElementString("CoverLoading", Enum.GetName(typeof(ECoverLoading), CoverLoading)); diff --git a/Vocaluxe/Screens/CScreenOptionsTheme.cs b/Vocaluxe/Screens/CScreenOptionsTheme.cs index 5e83735e..8f7369dc 100644 --- a/Vocaluxe/Screens/CScreenOptionsTheme.cs +++ b/Vocaluxe/Screens/CScreenOptionsTheme.cs @@ -12,7 +12,7 @@ namespace Vocaluxe.Screens class CScreenOptionsTheme : CMenu { // Version number for theme files. Increment it, if you've changed something on the theme files! - const int ScreenVersion = 2; + const int ScreenVersion = 3; private const string SelectSlideTheme = "SelectSlideTheme"; private const string SelectSlideSkin = "SelectSlideSkin"; @@ -20,6 +20,7 @@ namespace Vocaluxe.Screens private const string SelectSlideNoteLines = "SelectSlideNoteLines"; private const string SelectSlideToneHelper = "SelectSlideToneHelper"; private const string SelectSlideTimerLook = "SelectSlideTimerLook"; + private const string SelectSlideFadeInfo = "SelectSlideFadeInfo"; private const string SelectSlideCoverLoading = "SelectSlideCoverLoading"; private const string ButtonExit = "ButtonExit"; @@ -49,6 +50,7 @@ namespace Vocaluxe.Screens SelectSlideNoteLines, SelectSlideToneHelper, SelectSlideTimerLook, + SelectSlideFadeInfo, SelectSlideCoverLoading }; } @@ -68,6 +70,7 @@ namespace Vocaluxe.Screens SelectSlides[htSelectSlides(SelectSlideNoteLines)].SetValues((int)CConfig.DrawNoteLines); SelectSlides[htSelectSlides(SelectSlideToneHelper)].SetValues((int)CConfig.DrawToneHelper); SelectSlides[htSelectSlides(SelectSlideTimerLook)].SetValues((int)CConfig.TimerLook); + SelectSlides[htSelectSlides(SelectSlideFadeInfo)].SetValues((int)CConfig.FadePlayerInfo); SelectSlides[htSelectSlides(SelectSlideCoverLoading)].SetValues((int)CConfig.CoverLoading); } @@ -163,6 +166,7 @@ namespace Vocaluxe.Screens 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.SaveConfig(); diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index fd0cac43..b2db5f97 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -284,6 +284,18 @@ namespace Vocaluxe.Screens for (int p = 0; p < CGame.NumPlayer; p++) { SingNotes[htSingNotes(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[0]; + Texts[htTexts(TextNames[p,CGame.NumPlayer-1])].Alpha = Alpha[0]; + } + if (CConfig.FadePlayerInfo == EFadePlayerInfo.TR_CONFIG_FADEPLAYERINFO_ALL) + { + Statics[htStatics(StaticScores[p, CGame.NumPlayer - 1])].Alpha = Alpha[0]; + Statics[htStatics(StaticAvatars[p, CGame.NumPlayer - 1])].Alpha = Alpha[0]; + Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Alpha = Alpha[0]; + Texts[htTexts(TextScores[p, CGame.NumPlayer - 1])].Alpha = Alpha[0]; + } } if (Alpha.Length > 2) From af4c9875a075ae343883ea7d33b95ec42a3c5e3b Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Tue, 10 Apr 2012 16:36:37 +0200 Subject: [PATCH 30/42] Sing duets also with 3-6 players. --- Vocaluxe/Screens/CScreenSing.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index b2db5f97..e8a453f9 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -534,8 +534,11 @@ namespace Vocaluxe.Screens bool LyricsOnTop = (CGame.NumPlayer != 1) && CConfig.LyricsOnTop == EOffOn.TR_CONFIG_ON; if (song.IsDuet) - { - CGame.Player[1].LineNr = 1; + { + for (int i = 1; i <= CGame.NumPlayer; i = i + 2) + { + CGame.Player[i].LineNr = 1; + } Statics[htStatics(StaticLyricsDuet)].Visible = true; Lyrics[htLyrics(LyricMainDuet)].Visible = true; Lyrics[htLyrics(LyricSubDuet)].Visible = true; From e07f315fddb6901506bdb33b22e691919050ea10 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Tue, 10 Apr 2012 16:40:30 +0200 Subject: [PATCH 31/42] Forget to upload screen-changelog... --- Output/Themes/Changelog/Changelog_ScreenOptionsTheme.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Output/Themes/Changelog/Changelog_ScreenOptionsTheme.txt b/Output/Themes/Changelog/Changelog_ScreenOptionsTheme.txt index a2423088..a8c28341 100644 --- a/Output/Themes/Changelog/Changelog_ScreenOptionsTheme.txt +++ b/Output/Themes/Changelog/Changelog_ScreenOptionsTheme.txt @@ -1,5 +1,12 @@ ScreenOptionsTheme +++++++++++ +Version 3: + +Add: + +and some texts and statics for description (Text9 and Static9) +"TR_SCREENOTHEME_FADEINFO" ++++++++++ Version 2: From ddee8f5fae1bae7796d94fb9ec2a276134c2e6a7 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Thu, 12 Apr 2012 11:42:48 +0200 Subject: [PATCH 32/42] Change behavior on ScreenNames: Only show active profiles, you could select every profile only one time, except guest-profiles. --- Vocaluxe/Menu/CNameSelection.cs | 55 +++++++++++++++++++++++++++++--- Vocaluxe/Screens/CScreenNames.cs | 20 +++++++++--- 2 files changed, 66 insertions(+), 9 deletions(-) diff --git a/Vocaluxe/Menu/CNameSelection.cs b/Vocaluxe/Menu/CNameSelection.cs index 526e9277..46da60e4 100644 --- a/Vocaluxe/Menu/CNameSelection.cs +++ b/Vocaluxe/Menu/CNameSelection.cs @@ -73,6 +73,8 @@ namespace Vocaluxe.Menu int _player = -1; + private List VisibleProfiles; + public CNameSelection() { @@ -81,6 +83,8 @@ namespace Vocaluxe.Menu _TextureEmptyTile = CTheme.GetSkinTexture(_Theme.TextureEmptyTileName); _Tiles = new List(); + + VisibleProfiles = new List(); } public void Init() @@ -97,6 +101,8 @@ namespace Vocaluxe.Menu } } + UpdateVisibleProfiles(); + UpdateList(0); } @@ -361,22 +367,35 @@ namespace Vocaluxe.Menu } } + public void UpdateList() + { + UpdateVisibleProfiles(); + if (_Tiles.Count * (_Offset + 1) - VisibleProfiles.Count >= _Tiles.Count * _Offset) + { + UpdateList(_Offset - 1); + } + else + { + UpdateList(_Offset); + } + } + public void UpdateList(int offset) { if (offset < 0) offset = 0; - if ( _Tiles.Count * (offset + 1) - CProfiles.Profiles.Length < _Tiles.Count) + if ( _Tiles.Count * (offset + 1) - VisibleProfiles.Count < _Tiles.Count) { for (int i = 0; i < _Tiles.Count; i++) { - if ((i + offset * _Tiles.Count) < CProfiles.Profiles.Length) + if ((i + offset * _Tiles.Count) < VisibleProfiles.Count) { - _Tiles[i].Avatar.Texture = CProfiles.Profiles[i + offset * _Tiles.Count].Avatar.Texture; + _Tiles[i].Avatar.Texture = CProfiles.Profiles[VisibleProfiles[i + offset * _Tiles.Count]].Avatar.Texture; _Tiles[i].Avatar.Color = new SColorF(1, 1, 1, 1); - _Tiles[i].Name.Text = CProfiles.Profiles[i + offset * _Tiles.Count].PlayerName; - _Tiles[i].PlayerNr = i + offset * _Tiles.Count; + _Tiles[i].Name.Text = CProfiles.Profiles[VisibleProfiles[i + offset * _Tiles.Count]].PlayerName; + _Tiles[i].PlayerNr = VisibleProfiles[i + offset * _Tiles.Count]; } else { @@ -449,6 +468,32 @@ namespace Vocaluxe.Menu LoadTextures(); } + private void UpdateVisibleProfiles() + { + VisibleProfiles.Clear(); + for (int i = 0; i < CProfiles.Profiles.Length; i++) + { + bool visible = false; + //Show profile only if active + if (CProfiles.Profiles[i].Active == EOffOn.TR_CONFIG_ON) + { + visible = true; + } + for (int p = 0; p < CGame.NumPlayer; p++) + { + //Don't show profile if is selected, but if selected and guest + if (CGame.Player[p].ProfileID == i && CProfiles.Profiles[i].GuestProfile == EOffOn.TR_CONFIG_OFF) + { + visible = false; + } + } + if (visible) + { + VisibleProfiles.Add(i); + } + } + } + #region ThemeEdit public void MoveElement(int stepX, int stepY) { diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index 9f61948c..56aeafa6 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -111,18 +111,20 @@ namespace Vocaluxe.Screens case Keys.Add: if (CConfig.NumPlayer + 1 <= CSettings.MaxNumPlayer) { - CConfig.NumPlayer++; - SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection = CConfig.NumPlayer - 1; + SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection = CConfig.NumPlayer; UpdatePlayerNumber(); + //Update Tiles-List + NameSelections[htNameSelections(NameSelection)].UpdateList(); } break; case Keys.Subtract: if (CConfig.NumPlayer - 1 > 0) { - CConfig.NumPlayer--; - SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection = CConfig.NumPlayer - 1; + SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection = CConfig.NumPlayer - 2; UpdatePlayerNumber(); + //Update Tiles-List + NameSelections[htNameSelections(NameSelection)].UpdateList(); } break; } @@ -150,6 +152,8 @@ namespace Vocaluxe.Screens Texts[htTexts(TextPlayer[selectingKeyboardPlayerNr-1])].Text = CProfiles.Profiles[SelectedPlayerNr].PlayerName; //Update profile-warning CheckPlayers(); + //Update Tiles-List + NameSelections[htNameSelections(NameSelection)].UpdateList(); } //Reset all values selectingKeyboardPlayerNr = 0; @@ -271,6 +275,8 @@ namespace Vocaluxe.Screens selectingKeyboardPlayerNr = 0; selectingKeyboardActive = false; NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1); + //Update Tiles-List + NameSelections[htNameSelections(NameSelection)].UpdateList(); break; } @@ -414,6 +420,8 @@ namespace Vocaluxe.Screens Texts[htTexts(TextPlayer[i])].Text = CProfiles.Profiles[SelectedPlayerNr].PlayerName; //Update profile-warning CheckPlayers(); + //Update Tiles-List + NameSelections[htNameSelections(NameSelection)].UpdateList(); } } } @@ -447,6 +455,8 @@ namespace Vocaluxe.Screens if (!processed) UpdatePlayerNumber(); + //Update Tiles-List + NameSelections[htNameSelections(NameSelection)].UpdateList(); } if (MouseEvent.RB) @@ -469,6 +479,8 @@ namespace Vocaluxe.Screens Texts[htTexts(TextPlayer[i])].Text = CLanguage.Translate("TR_SCREENNAMES_PLAYER") + " " + (i+1).ToString(); //Update profile-warning CheckPlayers(); + //Update Tiles-List + NameSelections[htNameSelections(NameSelection)].UpdateList(); exit = false; } } From 3901a95cd302bc00f907c9b12a96ad16440d1b84 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Thu, 12 Apr 2012 11:44:52 +0200 Subject: [PATCH 33/42] Use only active profiles from config.xml. --- Vocaluxe/Base/CConfig.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index e6300f7e..f1fc7a56 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -996,7 +996,7 @@ namespace Vocaluxe.Base { if (Players[j] != string.Empty) { - if (Path.GetFileName(CProfiles.Profiles[i].ProfileFile) == Players[j]) + if (Path.GetFileName(CProfiles.Profiles[i].ProfileFile) == Players[j] && CProfiles.Profiles[i].Active == EOffOn.TR_CONFIG_ON) { //Update Game-infos with player CGame.Player[j].Name = CProfiles.Profiles[i].PlayerName; From f6b3733c9cb090dbe7f0f23e6a8f43994bc80cad Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Sat, 5 May 2012 12:10:48 +0200 Subject: [PATCH 34/42] Show bg-music-popup also on names-screen. Why was it deactivated? --- Vocaluxe/Menu/CGraphics.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Vocaluxe/Menu/CGraphics.cs b/Vocaluxe/Menu/CGraphics.cs index 3472f122..ac7fa531 100644 --- a/Vocaluxe/Menu/CGraphics.cs +++ b/Vocaluxe/Menu/CGraphics.cs @@ -449,8 +449,7 @@ namespace Vocaluxe.Menu KeyEvent KeyEvent = new KeyEvent(); MouseEvent MouseEvent = new MouseEvent(); - bool PopupPlayerControlAllowed = _CurrentScreen != EScreens.ScreenOptionsRecord && _CurrentScreen != EScreens.ScreenSing && _CurrentScreen != EScreens.ScreenNames - && _CurrentScreen != EScreens.ScreenSong; + bool PopupPlayerControlAllowed = _CurrentScreen != EScreens.ScreenOptionsRecord && _CurrentScreen != EScreens.ScreenSing && _CurrentScreen != EScreens.ScreenSong; bool Resume = true; while (keys.PollEvent(ref KeyEvent)) From 3edf3b47d2fbc620440ea87febaf708c34766c82 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Sat, 5 May 2012 13:11:38 +0200 Subject: [PATCH 35/42] Fix number of without-profile-players. --- Vocaluxe/Screens/CScreenNames.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index 56aeafa6..5a3feef9 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -546,7 +546,7 @@ namespace Vocaluxe.Screens { if (CGame.Player[i].ProfileID < 0) { - CGame.Player[i].Name = "Player " + i.ToString(); + CGame.Player[i].Name = "Player " + (i+1).ToString(); CGame.Player[i].Difficulty = EGameDifficulty.TR_CONFIG_EASY; CGame.Player[i].ProfileID = -1; } From 0733b8be99ddbb6aab25ccef36bc01de066cc78b Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Sun, 6 May 2012 15:59:05 +0200 Subject: [PATCH 36/42] Added player-selector for keyboard selection of profiles. Doesn't work yet. --- Output/Themes/Ambient/Screens/ScreenNames.xml | 3 +- Vocaluxe/Menu/CNameSelection.cs | 64 ++++++++++++++----- 2 files changed, 48 insertions(+), 19 deletions(-) diff --git a/Output/Themes/Ambient/Screens/ScreenNames.xml b/Output/Themes/Ambient/Screens/ScreenNames.xml index 9b9cd572..dbe0495d 100644 --- a/Output/Themes/Ambient/Screens/ScreenNames.xml +++ b/Output/Themes/Ambient/Screens/ScreenNames.xml @@ -679,8 +679,7 @@ 0,00 970 500 - Button - SelectSlideSColor + PlayerSelector Button SelectSlideSColor diff --git a/Vocaluxe/Menu/CNameSelection.cs b/Vocaluxe/Menu/CNameSelection.cs index 46da60e4..2dc3953e 100644 --- a/Vocaluxe/Menu/CNameSelection.cs +++ b/Vocaluxe/Menu/CNameSelection.cs @@ -16,6 +16,7 @@ namespace Vocaluxe.Menu public string Name; public string TextureEmptyTileName; public string ColorEmptyTileName; + public string TextureTileSelectedName; public float NameSpace; public float NameHeight; public string NameFont; @@ -55,6 +56,7 @@ namespace Vocaluxe.Menu private List _Tiles; private STexture _TextureEmptyTile; + private STexture _TextureTileSelected; public SColorF ColorEmptyTile; @@ -75,12 +77,15 @@ namespace Vocaluxe.Menu private List VisibleProfiles; + private CStatic PlayerSelector; + public CNameSelection() { _Theme = new SThemeNameSelection(); _TextureEmptyTile = CTheme.GetSkinTexture(_Theme.TextureEmptyTileName); + _TextureTileSelected = CTheme.GetSkinTexture(_Theme.TextureTileSelectedName); _Tiles = new List(); @@ -101,6 +106,11 @@ namespace Vocaluxe.Menu } } + PlayerSelector = new CStatic(); + PlayerSelector.Texture = _TextureTileSelected; + PlayerSelector.Rect = new SRectF(0, 0, (_TileW + 2), (_TileH + 2), (Rect.Z - 0.5f)); + PlayerSelector.Visible = false; + UpdateVisibleProfiles(); UpdateList(0); @@ -131,6 +141,8 @@ namespace Vocaluxe.Menu _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/A", navigator, ref ColorEmptyTile.A); } + _ThemeLoaded &= CHelper.GetValueFromXML(item + "/SkinTileSelected", navigator, ref _Theme.TextureTileSelectedName, String.Empty); + _ThemeLoaded &= CHelper.TryGetIntValueFromXML(item + "/Tiles/W", navigator, ref _TileW); _ThemeLoaded &= CHelper.TryGetIntValueFromXML(item + "/Tiles/H", navigator, ref _TileH); _ThemeLoaded &= CHelper.TryGetIntValueFromXML(item + "/Tiles/NumW", navigator, ref _NumW); @@ -194,16 +206,27 @@ namespace Vocaluxe.Menu writer.WriteElementString("A", ColorEmptyTile.A.ToString("#0.00")); } + writer.WriteComment(": Texture name"); + writer.WriteElementString("SkinTileSelected", _Theme.TextureTileSelectedName); + + writer.WriteComment(": Options for tiles"); writer.WriteStartElement("Tiles"); + writer.WriteComment(", : Width and height of tile"); writer.WriteElementString("W", _TileW.ToString()); writer.WriteElementString("H", _TileH.ToString()); + writer.WriteComment(", : Number of tiles"); writer.WriteElementString("NumW", _NumW.ToString()); - writer.WriteElementString("NumH", _NumH.ToString()); + writer.WriteElementString("NumH", _NumH.ToString()); + writer.WriteComment(", : Space between tiles"); writer.WriteElementString("SpaceW", _SpaceW.ToString("#0.00")); writer.WriteElementString("SpaceH", _SpaceH.ToString("#0.00")); + writer.WriteComment(": Options for player-name"); writer.WriteStartElement("Name"); + writer.WriteComment(": Space between name and tile"); writer.WriteElementString("Space", _Theme.NameSpace.ToString("#0.0")); + writer.WriteComment(": Text font name"); writer.WriteElementString("Font", _Theme.NameFont); + writer.WriteComment(": Text color from ColorScheme (high priority)"); if (_Theme.NameColorName != String.Empty) { writer.WriteElementString("Color", _Theme.NameColorName); @@ -215,8 +238,10 @@ namespace Vocaluxe.Menu writer.WriteElementString("B", _Theme.NameColor.B.ToString("#0.00")); writer.WriteElementString("A", _Theme.NameColor.A.ToString("#0.00")); } + writer.WriteComment(" - - Outline - - - - - - - - - 74 - 374 - - 0,00 - - 20 - - - - Player2 - - - TextSColor - - Center - - - - Outline - - - - - - - - - 74 - 529 - - 0,00 - - 20 - - - - Player3 - - - TextSColor - - Center - - - - Outline - - - - - - - - - 1206 - 219 - - 0,00 - - 20 - - - - Player4 - - - TextSColor - - Center - - - - Outline - - - - - - - - - 1206 - 374 - - 0,00 - - 20 - - - - Player5 - - - TextSColor - - Center - - - - Outline - - - - - - - - - 1206 - 529 - - 0,00 - - 20 - - - - Player6 - - - TextSColor - - Center - - - - Outline - - - - - - 640 @@ -498,6 +336,168 @@ + + + 74 + 219 + + 0,00 + + 20 + + + + Player1 + + + TextSColor + + Center + + + + Outline + + + + + + + + + 74 + 374 + + 0,00 + + 20 + + + + Player2 + + + TextSColor + + Center + + + + Outline + + + + + + + + + 74 + 529 + + 0,00 + + 20 + + + + Player3 + + + TextSColor + + Center + + + + Outline + + + + + + + + + 1206 + 219 + + 0,00 + + 20 + + + + Player4 + + + TextSColor + + Center + + + + Outline + + + + + + + + + 1206 + 374 + + 0,00 + + 20 + + + + Player5 + + + TextSColor + + Center + + + + Outline + + + + + + + + + 1206 + 529 + + 0,00 + + 20 + + + + Player6 + + + TextSColor + + Center + + + + Outline + + + + + + Button @@ -674,29 +674,44 @@ 6 - 152 - 127 - 0,00 - 970 - 390 - PlayerSelector - Button - SelectSlideSColor - - 100 - 100 - 8 - 3 - 24,28 - 30 - - 2 - Outline - TextColor - - 15 - - + + 152 + 127 + 0,00 + 970 + 393 + + Button + + + SelectSlideSColor + + PlayerSelector + + + + 100 + 100 + + 8 + 3 + + 25,28 + 30,00 + + + + 2,0 + + Outline + + TextColor + + + + 20 + + - + \ No newline at end of file From c9014fbc238dd8d7cb7e8ad415c84fcf3154cb52 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Sat, 2 Jun 2012 13:48:49 +0200 Subject: [PATCH 40/42] Fix bug on selecting profiles with keyboard. --- Vocaluxe/Menu/CNameSelection.cs | 8 +------- Vocaluxe/Screens/CScreenNames.cs | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Vocaluxe/Menu/CNameSelection.cs b/Vocaluxe/Menu/CNameSelection.cs index 94107f88..b11d65c4 100644 --- a/Vocaluxe/Menu/CNameSelection.cs +++ b/Vocaluxe/Menu/CNameSelection.cs @@ -363,7 +363,7 @@ namespace Vocaluxe.Menu break; } - Selection = _Offset * _Tiles.Count + _actualSelection; + Selection = VisibleProfiles[_Offset * _Tiles.Count + _actualSelection]; } public void KeyboardSelection(bool active, int player) @@ -474,12 +474,6 @@ namespace Vocaluxe.Menu return new CStatic(); } - public CStatic TilePlayerAvatar(int nr) - { - nr -= _Offset * _Tiles.Count; - return _Tiles[nr].Avatar; - } - public void UnloadTextures() { } diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index 5a3feef9..6a81a101 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -148,7 +148,7 @@ namespace Vocaluxe.Screens CConfig.Players[selectingKeyboardPlayerNr - 1] = CProfiles.Profiles[SelectedPlayerNr].ProfileFile; CConfig.SaveConfig(); //Update texture and name - Statics[htStatics(StaticPlayerAvatar[selectingKeyboardPlayerNr-1])].Texture = NameSelections[htNameSelections(NameSelection)].TilePlayerAvatar(SelectedPlayerNr).Texture; + Statics[htStatics(StaticPlayerAvatar[selectingKeyboardPlayerNr-1])].Texture = CProfiles.Profiles[SelectedPlayerNr].Avatar.Texture; Texts[htTexts(TextPlayer[selectingKeyboardPlayerNr-1])].Text = CProfiles.Profiles[SelectedPlayerNr].PlayerName; //Update profile-warning CheckPlayers(); From 792b27d5d3496c3fdff6992726907a0df7747782 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Sat, 2 Jun 2012 14:07:58 +0200 Subject: [PATCH 41/42] Some theme-updates. --- Output/Themes/Ambient/Screens/ScreenNames.xml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Output/Themes/Ambient/Screens/ScreenNames.xml b/Output/Themes/Ambient/Screens/ScreenNames.xml index 5a27cffe..a16e4651 100644 --- a/Output/Themes/Ambient/Screens/ScreenNames.xml +++ b/Output/Themes/Ambient/Screens/ScreenNames.xml @@ -675,16 +675,19 @@ - 152 + 172 127 0,00 - 970 + 945 393 - Button + CoverTile - SelectSlideSColor + 1,00 + 1,00 + 1,00 + 0,20 PlayerSelector @@ -696,7 +699,7 @@ 8 3 - 25,28 + 20,71 30,00 @@ -714,4 +717,4 @@ - \ No newline at end of file + From 25539d290712a466da265487bb44c54f108b494e Mon Sep 17 00:00:00 2001 From: Alexander Eckart Date: Mon, 4 Jun 2012 22:38:57 +0200 Subject: [PATCH 42/42] update to build 0066, some minor changes --- Vocaluxe/Base/CSettings.cs | 4 ++-- Vocaluxe/Menu/CSelectSlide.cs | 2 +- Vocaluxe/Screens/CScreenNames.cs | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Vocaluxe/Base/CSettings.cs b/Vocaluxe/Base/CSettings.cs index 6fd9414e..2f86ca2a 100644 --- a/Vocaluxe/Base/CSettings.cs +++ b/Vocaluxe/Base/CSettings.cs @@ -40,14 +40,14 @@ namespace Vocaluxe.Base public static EGameState GameState = EGameState.Start; public const string sProgramName = "Vocaluxe"; - public const string sProgramCodeName = "6 Player Test"; + public const string sProgramCodeName = "Test"; public const int iVersionMajor = 0; public const int iVersionMinor = 2; // milestones public const int iVersionSub = 0; // patches public const ERevision VersionRevision = ERevision.Alpha; - public const int iBuild = 65; // Increase on every published version! Never Reset! + public const int iBuild = 66; // Increase on every published version! Never Reset! public const int iDatabaseHighscoreVersion = 1; public const int iDatabaseCoverVersion = 1; diff --git a/Vocaluxe/Menu/CSelectSlide.cs b/Vocaluxe/Menu/CSelectSlide.cs index 96235a9d..099ef2ea 100644 --- a/Vocaluxe/Menu/CSelectSlide.cs +++ b/Vocaluxe/Menu/CSelectSlide.cs @@ -86,7 +86,7 @@ namespace Vocaluxe.Menu private List _ValueBounds = new List(); - public bool WithTextures; + public bool WithTextures = false; private int _Selection = -1; public int Selection diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index 6a81a101..2f1c952c 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -154,6 +154,7 @@ namespace Vocaluxe.Screens CheckPlayers(); //Update Tiles-List NameSelections[htNameSelections(NameSelection)].UpdateList(); + SetInteractionToButton(Buttons[htButtons(ButtonStart)]); } //Reset all values selectingKeyboardPlayerNr = 0; @@ -526,6 +527,8 @@ namespace Vocaluxe.Screens Texts[htTexts(TextPlayer[i])].Text = CProfiles.Profiles[CGame.Player[i].ProfileID].PlayerName; } } + + SetInteractionToButton(Buttons[htButtons(ButtonStart)]); } public override bool Draw()