From bc9d1882cf5794e4f0c33f418d211c3738de32be Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Thu, 12 Jul 2012 15:08:32 +0200 Subject: [PATCH] Added skip-function. Press CTRL + S or go to pause-menu. --- Output/Languages/Deutsch.xml | 1 + Output/Languages/English.xml | 1 + Output/Themes/Ambient/Screens/ScreenSing.xml | 65 +++++++++++++++++-- .../Themes/Changelog/Changelog_ScreenSing.txt | 6 ++ Vocaluxe/Base/CGame.cs | 5 ++ Vocaluxe/Screens/CScreenSing.cs | 27 ++++++-- 6 files changed, 97 insertions(+), 8 deletions(-) diff --git a/Output/Languages/Deutsch.xml b/Output/Languages/Deutsch.xml index 845b01ae..6a7c86c7 100644 --- a/Output/Languages/Deutsch.xml +++ b/Output/Languages/Deutsch.xml @@ -135,6 +135,7 @@ Pause Lied beenden Fortfahren + Lied überspringen Auswertung Bewertung diff --git a/Output/Languages/English.xml b/Output/Languages/English.xml index 1639ea9d..9b61a467 100644 --- a/Output/Languages/English.xml +++ b/Output/Languages/English.xml @@ -135,6 +135,7 @@ Pause Stop singing Continue + Skip this song Scores Rating diff --git a/Output/Themes/Ambient/Screens/ScreenSing.xml b/Output/Themes/Ambient/Screens/ScreenSing.xml index 4d33b2f0..1fa77550 100644 --- a/Output/Themes/Ambient/Screens/ScreenSing.xml +++ b/Output/Themes/Ambient/Screens/ScreenSing.xml @@ -1,7 +1,7 @@  - 4 + 5 None @@ -2333,7 +2333,7 @@ Button - 670 + 775 300 -2,11 150 @@ -2390,7 +2390,7 @@ Button - 460 + 355 300 -2,11 150 @@ -2441,6 +2441,63 @@ 26 + + + Button + + Button + + 565 + 300 + -2,11 + 150 + 50 + + + ButtonColor + + + ButtonSColor + + + 75 + 10 + + 32 + + 142 + + + ButtonTextColor + + + ButtonTextSColor + + Center + + Center + + + + Outline + + TR_SCREENSING_BUTTON_SKIP + + + + + + 10 + 26 + + + + + + 10 + 26 + + 637 @@ -2656,4 +2713,4 @@ - \ No newline at end of file + diff --git a/Output/Themes/Changelog/Changelog_ScreenSing.txt b/Output/Themes/Changelog/Changelog_ScreenSing.txt index 22c5fa99..6b857430 100644 --- a/Output/Themes/Changelog/Changelog_ScreenSing.txt +++ b/Output/Themes/Changelog/Changelog_ScreenSing.txt @@ -1,5 +1,11 @@ ScreenSing +++++++++++ +Version 5: + +Add: + + ++++++++++ Version 4: Added Elements for 6-player-singing! diff --git a/Vocaluxe/Base/CGame.cs b/Vocaluxe/Base/CGame.cs index 53f1b1c3..8e136d32 100644 --- a/Vocaluxe/Base/CGame.cs +++ b/Vocaluxe/Base/CGame.cs @@ -190,6 +190,11 @@ namespace Vocaluxe.Base return _GameMode.GetPoints(); } + public static int NumRounds + { + get { return _GameMode.GetNumSongs(); } + } + public static int NumPlayer { get { return _NumPlayer; } diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index 5d9848b2..908f0b92 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 = 4; + const int ScreenVersion = 5; struct TimeRect { @@ -51,6 +51,7 @@ namespace Vocaluxe.Screens private const string ButtonCancel = "ButtonCancel"; private const string ButtonContinue = "ButtonContinue"; + private const string ButtonSkip = "ButtonSkip"; private const string LyricMain = "LyricMain"; private const string LyricSub = "LyricSub"; @@ -127,6 +128,7 @@ namespace Vocaluxe.Screens List buttons = new List(); buttons.Add(ButtonCancel); buttons.Add(ButtonContinue); + buttons.Add(ButtonSkip); _ThemeButtons = buttons.ToArray(); _ThemeLyrics = new string[] { LyricMain, LyricSub, LyricMainDuet, LyricSubDuet, LyricMainTop, LyricSubTop }; @@ -200,12 +202,21 @@ namespace Vocaluxe.Screens SetVisuability(); break; + case Keys.S: + if(CGame.NumRounds > CGame.RoundNr) + if(KeyEvent.ModCTRL) + LoadNextSong(); + break; + case Keys.Enter: if (Buttons[htButtons(ButtonContinue)].Selected && _Pause) - TogglePause(); - + TogglePause(); if (Buttons[htButtons(ButtonCancel)].Selected && _Pause) - Stop(); + Stop(); + if (Buttons[htButtons(ButtonSkip)].Selected && _Pause) + { + LoadNextSong(); + } break; } } @@ -232,6 +243,11 @@ namespace Vocaluxe.Screens if (Buttons[htButtons(ButtonCancel)].Selected && _Pause) Stop(); + if (Buttons[htButtons(ButtonSkip)].Selected && _Pause) + { + LoadNextSong(); + TogglePause(); + } } @@ -708,11 +724,14 @@ namespace Vocaluxe.Screens { Buttons[htButtons(ButtonCancel)].Visible = true; Buttons[htButtons(ButtonContinue)].Visible = true; + if (CGame.NumRounds > CGame.RoundNr) + Buttons[htButtons(ButtonSkip)].Visible = true; CSound.Pause(_CurrentStream); }else { Buttons[htButtons(ButtonCancel)].Visible = false; Buttons[htButtons(ButtonContinue)].Visible = false; + Buttons[htButtons(ButtonSkip)].Visible = false; CSound.Play(_CurrentStream); } }