From 4b67978df6c71aa82d113c4b824f7f526692fd26 Mon Sep 17 00:00:00 2001 From: Gary Kertopermono Date: Tue, 9 Apr 2019 23:23:02 +0200 Subject: [PATCH 01/59] Relative song paths will now be converted to absolute song paths --- Vocaluxe/Base/CConfig.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index 5d4fb05a..191c41b3 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -687,8 +687,9 @@ namespace Vocaluxe.Base foreach (string folder in Config.Game.SongFolder) { //Check if folder exists - if (Directory.Exists(folder)) - SongFolders.Add(folder); + if (Directory.Exists(folder)) { + SongFolders.Add(Path.GetFullPath(folder)); + } } } From b248c4b2bdbb247a66b8b1ce6846375c5b3ebf6b Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 7 Jan 2020 09:27:46 +0100 Subject: [PATCH 02/59] Reload Song From Disk - develop Reload Song From Disk using F5 or CTRL+R while in pause menu --- Vocaluxe/Screens/CScreenSing.cs | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index b5eb65ed..ad5a5c59 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -287,6 +287,25 @@ namespace Vocaluxe.Screens if (CConfig.Config.Debug.SaveModifiedSongs == EOffOn.TR_CONFIG_ON) song.Save(); break; + + case Keys.R: + if (keyEvent.Mod == EModifier.Ctrl) + { + if (_Pause) + { + _SetPause(false); + _RestartRound(); + } + } + break; + + case Keys.F5: + if (_Pause) + { + _SetPause(false); + _RestartRound(); + } + break; } } @@ -1054,6 +1073,7 @@ namespace Vocaluxe.Screens } CSong song = CGame.GetSong(); + song.ReloadSong(); if (song == null) { @@ -1828,4 +1848,4 @@ namespace Vocaluxe.Screens } } } -} \ No newline at end of file +} From 791d2293d3652e3f8c88498035ef468c5e8576ec Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 7 Jan 2020 09:29:49 +0100 Subject: [PATCH 03/59] Added ReloadSong() to reload a song from disk --- VocaluxeLib/Songs/CSong.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/VocaluxeLib/Songs/CSong.cs b/VocaluxeLib/Songs/CSong.cs index e6ddaf4d..8a63b605 100644 --- a/VocaluxeLib/Songs/CSong.cs +++ b/VocaluxeLib/Songs/CSong.cs @@ -288,6 +288,14 @@ namespace VocaluxeLib.Songs return loader.ReadNotes(); } + public bool ReloadSong() + { + var loader = new CSongLoader(this); + bool retValue = loader.ReadHeader(); + retValue = loader.ReadNotes(true); + return retValue; + } + public bool Save() { return Save(Path.Combine(Folder, FileName)); @@ -518,4 +526,4 @@ namespace VocaluxeLib.Songs ShortEnd.Source = EDataSource.Calculated; } } -} \ No newline at end of file +} From a4df215654791c1b3f086438e8cfd05772152ff2 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 7 Jan 2020 09:31:40 +0100 Subject: [PATCH 04/59] Some fixes to allow reload a song from disk --- VocaluxeLib/Songs/CSongLoader.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/VocaluxeLib/Songs/CSongLoader.cs b/VocaluxeLib/Songs/CSongLoader.cs index 99702bc8..965176e0 100644 --- a/VocaluxeLib/Songs/CSongLoader.cs +++ b/VocaluxeLib/Songs/CSongLoader.cs @@ -88,6 +88,9 @@ namespace VocaluxeLib.Songs _Song._CalculateMedley = true; _Song.Preview.Source = EDataSource.None; _Song.ShortEnd.Source = EDataSource.None; + _Song.Start = 0; + _Song.VideoGap = 0; + _Song.Preview.StartTime = 0; var headerFlags = new EHeaderFlags(); StreamReader sr = null; @@ -761,4 +764,4 @@ namespace VocaluxeLib.Songs } } } -} \ No newline at end of file +} From d6b1e5359bc51d27d49f9659418234a7b1b812b2 Mon Sep 17 00:00:00 2001 From: Stefan Date: Thu, 16 Jan 2020 23:07:03 +0100 Subject: [PATCH 05/59] Wrong variable at _DrawLyricHelper() --- 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 df0648d2..a1472631 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -879,7 +879,7 @@ namespace Vocaluxe.Screens _Statics[_StaticLyricHelperTop].Color.R, _Statics[_StaticLyricHelperTop].Color.G, _Statics[_StaticLyricHelperTop].Color.B, - _Statics[_StaticLyricHelperTop].Color.A * _Statics[_StaticLyricHelper].Alpha * alpha); + _Statics[_StaticLyricHelperTop].Color.A * _Statics[_StaticLyricHelperTop].Alpha * alpha); float distance = _Lyrics[_LyricMainTop].GetCurrentLyricPosX() - rect.X - rect.W; CDraw.DrawTexture(_Statics[_StaticLyricHelperTop].Texture, From 0403d79e4e8c1bbccdd5efb73e82fce77614617d Mon Sep 17 00:00:00 2001 From: Stefan Date: Fri, 17 Jan 2020 22:01:49 +0100 Subject: [PATCH 06/59] Fix: Wrong lyric colors in duet mode (fix #361) --- Vocaluxe/Screens/CScreenSing.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index a1472631..fc09c178 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -532,7 +532,7 @@ namespace Vocaluxe.Screens _SingNotes[_SingBars].PlayerNotes[j].SetLine(nr); } - if (i == 0 && !song.IsDuet || i == 1 && song.IsDuet) + if (i == 0) { _Lyrics[_LyricMain].SetLine(lines[nr]); _Lyrics[_LyricMainTop].SetLine(lines[nr]); @@ -550,7 +550,7 @@ namespace Vocaluxe.Screens _Lyrics[_LyricSubTop].Clear(); } } - if (i == 0 && song.IsDuet) + if (i == 1 && song.IsDuet) { _Lyrics[_LyricMainDuet].SetLine(lines[nr]); _TimeToFirstNoteDuet = CGame.GetTimeFromBeats(lines[nr].FirstNoteBeat - lines[nr].StartBeat, song.BPM); @@ -564,7 +564,7 @@ namespace Vocaluxe.Screens } else { - if (i == 0 && !song.IsDuet || i == 1 && song.IsDuet) + if (i == 0) { _Lyrics[_LyricMain].Clear(); _Lyrics[_LyricSub].Clear(); @@ -573,7 +573,7 @@ namespace Vocaluxe.Screens _TimeToFirstNote = 0f; } - if (i == 0 && song.IsDuet) + if (i == 1 && song.IsDuet) { _Lyrics[_LyricMainDuet].Clear(); _Lyrics[_LyricSubDuet].Clear(); @@ -1199,8 +1199,8 @@ namespace Vocaluxe.Screens if (CGame.GetSong() != null && CGame.GetSong().IsDuet) { - bottomLyricsVisible = true; - topLyricsVisible = false; + bottomLyricsVisible = false; + topLyricsVisible = true; duetLyricsVisible = true; } From da911d4223a656ff10da4dda8d12d4a13c5f20fa Mon Sep 17 00:00:00 2001 From: Stefan Date: Fri, 17 Jan 2020 22:04:58 +0100 Subject: [PATCH 07/59] Fix: Wrong lyric colors in duet mode (fix #361) --- Output/Themes/Genius/Screens/ScreenSing.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Output/Themes/Genius/Screens/ScreenSing.xml b/Output/Themes/Genius/Screens/ScreenSing.xml index 821093fb..36cebdac 100644 --- a/Output/Themes/Genius/Screens/ScreenSing.xml +++ b/Output/Themes/Genius/Screens/ScreenSing.xml @@ -46,7 +46,7 @@ 0 - 0 + 610 1280 90 -0.75 @@ -136,7 +136,7 @@ 40 - 10 + 623 45 36 -1 @@ -1501,7 +1501,7 @@ 637 - 7 + 620 1200 42 -1 @@ -1512,7 +1512,7 @@ 637 - 48 + 662 1200 35 -1 From 582934e7d0096e3c8437948a1b180916f7e21cf0 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 18 Jan 2020 12:40:38 +0100 Subject: [PATCH 08/59] Show song name text on lyric position top if possible Until now there was no song name text displayed, if lyrics position is set to top or a duet song was startet. This change check, if there is enough time before the first lyrics will be displayed and show the song name text, if there is enough time. If necessary, the max display time of 10 seconds will be shortened down to a value between 10 to 4 seconds. --- Vocaluxe/Screens/CScreenSing.cs | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index fc09c178..62c2a997 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -123,6 +123,7 @@ namespace Vocaluxe.Screens private float _RemainingTimeToFirstNote; private float _TimeToFirstNoteDuet; private float _RemainingTimeToFirstNoteDuet; + private float _TimeShowSongTextTotal; private Stopwatch _TimerSongText; private Stopwatch _TimerDuetText1; @@ -610,23 +611,23 @@ namespace Vocaluxe.Screens private void _UpdateSongText() { - if (_TimerSongText.IsRunning && !_Lyrics[_LyricMainDuet].Visible && !_Lyrics[_LyricMainTop].Visible) + if (_TimerSongText.IsRunning) { float t = _TimerSongText.ElapsedMilliseconds / 1000f; - if (t < 10f) + if (t < _TimeShowSongTextTotal) { _Statics[_StaticSongText].Visible = true; _Texts[_TextSongName].Visible = true; - if (t < 7f) + if (t < (_TimeShowSongTextTotal - 3f)) { _Statics[_StaticSongText].Color.A = 1f; _Texts[_TextSongName].Color.A = 1f; } else { - _Statics[_StaticSongText].Color.A = (10f - t) / 3f; - _Texts[_TextSongName].Color.A = (10f - t) / 3f; + _Statics[_StaticSongText].Color.A = (_TimeShowSongTextTotal - t) / 3f; + _Texts[_TextSongName].Color.A = (_TimeShowSongTextTotal - t) / 3f; } } else @@ -1148,7 +1149,21 @@ namespace Vocaluxe.Screens _TimerDuetText1.Reset(); _TimerDuetText2.Reset(); - if (!song.IsDuet) + float realGap = song.Gap - song.Start; + _TimeShowSongTextTotal = 10f; + if (_Lyrics[_LyricMainDuet].Visible || _Lyrics[_LyricMainTop].Visible) + { + if (realGap < 11f) + { + _TimeShowSongTextTotal = 0; + } + else if (realGap < 17f) + { + _TimeShowSongTextTotal = realGap - 7f; + } + } + + if (_TimeShowSongTextTotal > 0) _TimerSongText.Start(); } From fafb68adc9b4daf2f7cd21307a040f189d66fd05 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 18 Jan 2020 13:03:07 +0100 Subject: [PATCH 09/59] Fixing some duet display issues after pull request #454 Duet names was displayed wrong and second voice lyrics was only displayed, if the first voice lyrics was displayed too. --- Vocaluxe/Screens/CScreenSing.cs | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index fc09c178..c34c80fc 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -463,17 +463,11 @@ namespace Vocaluxe.Screens if (alpha.Length > 2) { - _Lyrics[_LyricMainDuet].Alpha = alpha[0]; - _Lyrics[_LyricSubDuet].Alpha = alpha[1]; + _Lyrics[_LyricMainDuet].Alpha = alpha[2]; + _Lyrics[_LyricSubDuet].Alpha = alpha[3]; - _Statics[_StaticLyricsDuet].Alpha = alpha[0]; - _Statics[_StaticLyricHelperDuet].Alpha = alpha[0]; - - _Lyrics[_LyricMain].Alpha = alpha[2]; - _Lyrics[_LyricSub].Alpha = alpha[3]; - - _Statics[_StaticLyrics].Alpha = alpha[2]; - _Statics[_StaticLyricHelper].Alpha = alpha[2]; + _Statics[_StaticLyricsDuet].Alpha = alpha[2]; + _Statics[_StaticLyricHelperDuet].Alpha = alpha[2]; } } @@ -665,7 +659,7 @@ namespace Vocaluxe.Screens timer.Stop(); } } - else if (!timer.IsRunning && timer.ElapsedMilliseconds == 0 && _Lyrics[_LyricMainDuet].Alpha > 0 && CGame.GetSong().IsDuet) + else if (!timer.IsRunning && timer.ElapsedMilliseconds == 0 && _Lyrics[_LyricMainTop].Alpha > 0 && CGame.GetSong().IsDuet) timer.Start(); else textName.Visible = false; @@ -698,7 +692,7 @@ namespace Vocaluxe.Screens _TimerDuetText2.Stop(); } } - else if (!_TimerDuetText2.IsRunning && _TimerDuetText2.ElapsedMilliseconds == 0 && _Lyrics[_LyricMain].Alpha > 0 && CGame.GetSong().IsDuet) + else if (!_TimerDuetText2.IsRunning && _TimerDuetText2.ElapsedMilliseconds == 0 && _Lyrics[_LyricMainDuet].Alpha > 0 && CGame.GetSong().IsDuet) _TimerDuetText2.Start(); else _Texts[_TextDuetName2].Visible = false; From a36ee3e389e83ea4d37a3424fca35f6c621cfbbc Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 18 Jan 2020 23:05:47 +0100 Subject: [PATCH 10/59] Added key to skip 30 seconds and don't reload notes from pause menu --- Vocaluxe/Screens/CScreenSing.cs | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index 0134dadd..8320805a 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -289,6 +289,7 @@ namespace Vocaluxe.Screens song.Save(); break; + // Restart Round and reload song file header case Keys.R: if (keyEvent.Mod == EModifier.Ctrl) { @@ -300,6 +301,7 @@ namespace Vocaluxe.Screens } break; + // Restart Round and reload song file header case Keys.F5: if (_Pause) { @@ -307,6 +309,23 @@ namespace Vocaluxe.Screens _RestartRound(); } break; + + // Skip 30 seconds + case Keys.Right: + if (keyEvent.Mod == EModifier.Ctrl) + { + if (!_Pause) + { + if (_TimerSongText.IsRunning) + _TimerSongText.Stop(); + + float newTime = _CurrentTime + 30f; + if (CSound.GetLength(_CurrentStream) < (_CurrentTime + 30f)) + newTime = CSound.GetLength(_CurrentStream) - 1f; + CSound.SetPosition(_CurrentStream, newTime); + } + } + break; } } @@ -982,7 +1001,7 @@ namespace Vocaluxe.Screens _CloseSong(); CGame.ResetPlayer(); - _LoadCurrentSong(); + _LoadCurrentSong(true); _StartSong(); } @@ -1062,7 +1081,7 @@ namespace Vocaluxe.Screens /// /// Prepare streams and screen for current song. /// - private void _LoadCurrentSong() + private void _LoadCurrentSong(bool restartRound = false) { if (CGame.IsFinished()) { @@ -1071,7 +1090,7 @@ namespace Vocaluxe.Screens } CSong song = CGame.GetSong(); - song.ReloadSong(); + song.ReloadSong(!restartRound); if (song == null) { From 872bcf776fa8a9555c224972dd10c46d6ba3ec0d Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 18 Jan 2020 23:07:17 +0100 Subject: [PATCH 11/59] Modified ReloadSong() to allow no notes reloading --- VocaluxeLib/Songs/CSong.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VocaluxeLib/Songs/CSong.cs b/VocaluxeLib/Songs/CSong.cs index 4d8e41f7..e507fd94 100644 --- a/VocaluxeLib/Songs/CSong.cs +++ b/VocaluxeLib/Songs/CSong.cs @@ -288,11 +288,11 @@ namespace VocaluxeLib.Songs return loader.ReadNotes(); } - public bool ReloadSong() + public bool ReloadSong(bool reloadNotes) { var loader = new CSongLoader(this); bool retValue = loader.ReadHeader(); - retValue = loader.ReadNotes(true); + retValue = loader.ReadNotes(reloadNotes); return retValue; } From 630a6242ae081036d7d2dc10cbae37226ba90df7 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 18 Jan 2020 23:12:00 +0100 Subject: [PATCH 12/59] Added key to skip 30 seconds and don't reload notes from pause menu --- Vocaluxe/Screens/CScreenSing.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index 8320805a..c8e0d8ab 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -1001,7 +1001,7 @@ namespace Vocaluxe.Screens _CloseSong(); CGame.ResetPlayer(); - _LoadCurrentSong(true); + _LoadCurrentSong(false); _StartSong(); } @@ -1081,7 +1081,7 @@ namespace Vocaluxe.Screens /// /// Prepare streams and screen for current song. /// - private void _LoadCurrentSong(bool restartRound = false) + private void _LoadCurrentSong(bool reloadNotes = true) { if (CGame.IsFinished()) { @@ -1090,7 +1090,7 @@ namespace Vocaluxe.Screens } CSong song = CGame.GetSong(); - song.ReloadSong(!restartRound); + song.ReloadSong(reloadNotes); if (song == null) { From 3fcb22269afc8bd8a5706fb400be76f5d57122d2 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 18 Jan 2020 23:28:57 +0100 Subject: [PATCH 13/59] Small changes to make sure song variable will be used after null checking --- 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 c8e0d8ab..dab2ce04 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -1090,7 +1090,6 @@ namespace Vocaluxe.Screens } CSong song = CGame.GetSong(); - song.ReloadSong(reloadNotes); if (song == null) { @@ -1098,6 +1097,7 @@ namespace Vocaluxe.Screens return; } + song.ReloadSong(reloadNotes); string songname = song.Artist + " - " + song.Title; int rounds = CGame.GetNumSongs(); if (rounds > 1) From 64c0b392a90168137cbd2d8ae0e695063d6f4d79 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 19 Jan 2020 09:29:54 +0100 Subject: [PATCH 14/59] Removing two "Code Smells" --- Vocaluxe/Screens/CScreenSing.cs | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index dab2ce04..843d7532 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -291,13 +291,10 @@ namespace Vocaluxe.Screens // Restart Round and reload song file header case Keys.R: - if (keyEvent.Mod == EModifier.Ctrl) + if (keyEvent.Mod == EModifier.Ctrl && _Pause) { - if (_Pause) - { - _SetPause(false); - _RestartRound(); - } + _SetPause(false); + _RestartRound(); } break; @@ -312,18 +309,15 @@ namespace Vocaluxe.Screens // Skip 30 seconds case Keys.Right: - if (keyEvent.Mod == EModifier.Ctrl) + if (keyEvent.Mod == EModifier.Ctrl && !_Pause) { - if (!_Pause) - { - if (_TimerSongText.IsRunning) - _TimerSongText.Stop(); + if (_TimerSongText.IsRunning) + _TimerSongText.Stop(); - float newTime = _CurrentTime + 30f; - if (CSound.GetLength(_CurrentStream) < (_CurrentTime + 30f)) - newTime = CSound.GetLength(_CurrentStream) - 1f; - CSound.SetPosition(_CurrentStream, newTime); - } + float newTime = _CurrentTime + 30f; + if (CSound.GetLength(_CurrentStream) < (_CurrentTime + 30f)) + newTime = CSound.GetLength(_CurrentStream) - 1f; + CSound.SetPosition(_CurrentStream, newTime); } break; } From 50426bdf3fb7b6c1fc059960553e0c45e8ddd2a1 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 19 Jan 2020 09:38:46 +0100 Subject: [PATCH 15/59] Disable CTRL+Arrow Right in party modes --- Vocaluxe/Screens/CScreenSing.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index 843d7532..11009b7d 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -309,7 +309,8 @@ namespace Vocaluxe.Screens // Skip 30 seconds case Keys.Right: - if (keyEvent.Mod == EModifier.Ctrl && !_Pause) + SScreenSongOptions Sso = CParty.GetSongSelectionOptions(); + if (keyEvent.Mod == EModifier.Ctrl && !_Pause && !Sso.Selection.PartyMode) { if (_TimerSongText.IsRunning) _TimerSongText.Stop(); From 59808d1f9fdaf7f5d44dd598eefbfbb9da4e3a73 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 19 Jan 2020 09:51:31 +0100 Subject: [PATCH 16/59] Disable reloading song while party mode is active --- Vocaluxe/Screens/CScreenSing.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index 11009b7d..be339a17 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -30,6 +30,7 @@ using VocaluxeLib.Draw; using VocaluxeLib.Log; using VocaluxeLib.Menu; using VocaluxeLib.Menu.SingNotes; +using VocaluxeLib.PartyModes; using VocaluxeLib.Songs; namespace Vocaluxe.Screens @@ -133,6 +134,7 @@ namespace Vocaluxe.Screens private bool _Webcam; private CBackground _SlideShow; + private SScreenSongOptions _Sso; public override EMusicType CurrentMusicType { @@ -309,8 +311,7 @@ namespace Vocaluxe.Screens // Skip 30 seconds case Keys.Right: - SScreenSongOptions Sso = CParty.GetSongSelectionOptions(); - if (keyEvent.Mod == EModifier.Ctrl && !_Pause && !Sso.Selection.PartyMode) + if (keyEvent.Mod == EModifier.Ctrl && !_Pause && !_Sso.Selection.PartyMode) { if (_TimerSongText.IsRunning) _TimerSongText.Stop(); @@ -390,6 +391,7 @@ namespace Vocaluxe.Screens _SetPause(false); _TimeRects.Clear(); + _Sso = CParty.GetSongSelectionOptions(); _SingNotes[_SingBars].Init(0); _AssignPlayerElements(); @@ -1092,7 +1094,9 @@ namespace Vocaluxe.Screens return; } - song.ReloadSong(reloadNotes); + if (!_Sso.Selection.PartyMode) + song.ReloadSong(reloadNotes); + string songname = song.Artist + " - " + song.Title; int rounds = CGame.GetNumSongs(); if (rounds > 1) From 183d4b12bf80989705e36128dd8e7091b0325908 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 19 Jan 2020 12:21:31 +0100 Subject: [PATCH 17/59] Change: Reload song from disk only at game mode normal This should fix issues while song reloading at short and medley game modes. In my opinion testing song txt file changes are in almost all cases only useful at normal game mode, so this change could be the final workaround. For checking different medley values in the txt file (MEDLEYSTARTBEAT / MEDLEYENDBEAT) you still have to restart the game. --- 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 be339a17..278e7965 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -1094,7 +1094,7 @@ namespace Vocaluxe.Screens return; } - if (!_Sso.Selection.PartyMode) + if (!_Sso.Selection.PartyMode && CGame.GameMode == EGameMode.TR_GAMEMODE_NORMAL) song.ReloadSong(reloadNotes); string songname = song.Artist + " - " + song.Title; From 57fac61c93a092bccc4d3114c6f65c1aea6cf30d Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 19 Jan 2020 16:23:31 +0100 Subject: [PATCH 18/59] Fix missing background image after reloading from disk --- VocaluxeLib/Songs/CSongLoader.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/VocaluxeLib/Songs/CSongLoader.cs b/VocaluxeLib/Songs/CSongLoader.cs index 965176e0..ca642b4c 100644 --- a/VocaluxeLib/Songs/CSongLoader.cs +++ b/VocaluxeLib/Songs/CSongLoader.cs @@ -82,6 +82,7 @@ namespace VocaluxeLib.Songs _Song.Languages.Clear(); _Song.Genres.Clear(); _Song.UnknownTags.Clear(); + _Song.BackgroundFileNames.Clear(); _Song._Comment = ""; _Song.ManualEncoding = false; _Song.Medley.Source = EDataSource.None; From bd6ce4de63e8fcc29a6975544eef378f11d72d29 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 19 Jan 2020 16:28:06 +0100 Subject: [PATCH 19/59] Change: Automatic aspect ratio also for background images --- 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 092fe238..ecd43b0b 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -1081,11 +1081,11 @@ namespace Vocaluxe.Screens voiceAssignments[i] = CGame.Players[i].VoiceNr; } + _VideoAspect = EAspect.Automatic; if (!String.IsNullOrEmpty(song.VideoFileName)) { _CurrentVideo = CVideo.Load(Path.Combine(song.Folder, song.VideoFileName)); CVideo.Skip(_CurrentVideo, song.Start, song.VideoGap); - _VideoAspect = EAspect.Automatic; } CDraw.RemoveTexture(ref _Background); From a022f5c927b3d0718bde67db40ff42a2c046cf6b Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 19 Jan 2020 16:29:59 +0100 Subject: [PATCH 20/59] Fixed code smell --- VocaluxeLib/Songs/CSong.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/VocaluxeLib/Songs/CSong.cs b/VocaluxeLib/Songs/CSong.cs index e507fd94..bc101698 100644 --- a/VocaluxeLib/Songs/CSong.cs +++ b/VocaluxeLib/Songs/CSong.cs @@ -292,6 +292,9 @@ namespace VocaluxeLib.Songs { var loader = new CSongLoader(this); bool retValue = loader.ReadHeader(); + if (!retValue) + return false; + retValue = loader.ReadNotes(reloadNotes); return retValue; } From 4c1eaa407e7d18ecab485b8049beed73617cf5c3 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 21 Jan 2020 07:12:48 +0100 Subject: [PATCH 21/59] Keyboard shortcut to show the highscores of the selected song CTRL+H will show the highscores of the selected song. --- Vocaluxe/Screens/CScreenSong.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index cf0e1183..8fc5e986 100644 --- a/Vocaluxe/Screens/CScreenSong.cs +++ b/Vocaluxe/Screens/CScreenSong.cs @@ -99,6 +99,18 @@ namespace Vocaluxe.Screens private ISongMenu _SongMenu; private CPlaylist _Playlist; + private static int _StaticSelectedSongID; + + private static void setStaticSelectedSongID(int songID) + { + _StaticSelectedSongID = songID; + } + + public static int getSelectedSongID() + { + return _StaticSelectedSongID; + } + public override EMusicType CurrentMusicType { get { return CSongs.IsInCategory ? EMusicType.Preview : EMusicType.Background; } @@ -303,6 +315,14 @@ namespace Vocaluxe.Screens if (keyEvent.Mod == EModifier.Ctrl && CSongs.NumSongsVisible > 0 && !_Sso.Selection.PartyMode) _StartMedleySong(_SongMenu.GetPreviewSongNr()); break; + + case Keys.H: + if (keyEvent.Mod == EModifier.Ctrl && CSongs.NumSongsVisible > 0 && !_Sso.Selection.PartyMode) + { + CScreenSong.setStaticSelectedSongID(_SongMenu.GetPreviewSongNr()); + CBase.Graphics.FadeTo(EScreen.Highscore); + } + break; } if (!_SearchActive) { From 72d279e5257f35b48c36641382fba50bf82800a3 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 21 Jan 2020 07:16:30 +0100 Subject: [PATCH 22/59] Added possibility to open highscores from song screen If opened from song screen, you can use the Arrow Left/Right keys to switch between the game modes Normal, Short, Medley and Duet. --- Vocaluxe/Screens/CScreenHighscore.cs | 66 ++++++++++++++++++++++------ 1 file changed, 52 insertions(+), 14 deletions(-) diff --git a/Vocaluxe/Screens/CScreenHighscore.cs b/Vocaluxe/Screens/CScreenHighscore.cs index 0e6a746f..5e39e45d 100644 --- a/Vocaluxe/Screens/CScreenHighscore.cs +++ b/Vocaluxe/Screens/CScreenHighscore.cs @@ -49,6 +49,7 @@ namespace Vocaluxe.Screens private int _Round; private int _Pos; private bool _IsDuet; + private bool _FromScreenSong = false; public override EMusicType CurrentMusicType { @@ -113,11 +114,13 @@ namespace Vocaluxe.Screens break; case Keys.Down: - _ChangePos(1); + if (!_FromScreenSong) + _ChangePos(1); break; case Keys.Up: - _ChangePos(-1); + if (!_FromScreenSong) + _ChangePos(-1); break; case Keys.Left: @@ -234,13 +237,31 @@ namespace Vocaluxe.Screens { _Pos = 0; int rounds = CGame.NumRounds; - _Scores = new List[rounds]; - for (int round = 0; round < rounds; round++) + + if (rounds == 0) { - int songID = CGame.GetSong(round).ID; - EGameMode gameMode = CGame.GetGameMode(round); + _FromScreenSong = true; + _Round = (int)EGameMode.TR_GAMEMODE_NORMAL; + _Scores = new List[4]; + int songID = CSongs.VisibleSongs[CScreenSong.getSelectedSongID()].ID; EHighscoreStyle style = CBase.Config.GetHighscoreStyle(); - _Scores[round] = CDataBase.LoadScore(songID, gameMode, style); + + for (int gameModeNum = 0; gameModeNum < 4; gameModeNum++) + { + _Scores[gameModeNum] = CDataBase.LoadScore(songID, (EGameMode)gameModeNum, style); + } + } + else + { + _FromScreenSong = false; + _Scores = new List[rounds]; + for (int round = 0; round < rounds; round++) + { + int songID = CGame.GetSong(round).ID; + EGameMode gameMode = CGame.GetGameMode(round); + EHighscoreStyle style = CBase.Config.GetHighscoreStyle(); + _Scores[round] = CDataBase.LoadScore(songID, gameMode, style); + } } } @@ -248,15 +269,21 @@ namespace Vocaluxe.Screens { _IsDuet = false; CPoints points = CGame.GetPoints(); - CSong song = CGame.GetSong(_Round); + + CSong song; + if (_FromScreenSong) + song = CSongs.GetSong(CSongs.VisibleSongs[CScreenSong.getSelectedSongID()].ID); + else + song = CGame.GetSong(_Round); + if (song == null) return; _Texts[_TextSongName].Text = song.Artist + " - " + song.Title; - if (points.NumRounds > 1) + if (points != null && points.NumRounds > 1) _Texts[_TextSongName].Text += " (" + (_Round + 1) + "/" + points.NumRounds + ")"; - switch (CGame.GetGameMode(_Round)) + switch ((_FromScreenSong ? (EGameMode)_Round : CGame.GetGameMode(_Round))) { case EGameMode.TR_GAMEMODE_NORMAL: _Texts[_TextSongMode].Text = "TR_GAMEMODE_NORMAL"; @@ -296,9 +323,20 @@ namespace Vocaluxe.Screens private void _ChangeRound(int num) { - CPoints points = CGame.GetPoints(); - _Round += num; - _Round = _Round.Clamp(0, points.NumRounds - 1); + if (_FromScreenSong) + { + if (_Round == (int)EGameMode.TR_GAMEMODE_SHORTSONG) + _Round = (int)EGameMode.TR_GAMEMODE_NORMAL; + else + ++_Round; + } + else + { + CPoints points = CGame.GetPoints(); + _Round += num; + _Round = _Round.Clamp(0, points.NumRounds - 1); + } + _UpdateRound(); } @@ -307,4 +345,4 @@ namespace Vocaluxe.Screens CParty.LeavingHighscore(); } } -} \ No newline at end of file +} From 761d25d68209cfe1e6522765ea32b31cfaa59ee2 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 25 Jan 2020 08:22:32 +0100 Subject: [PATCH 23/59] Fixed song name / updates to changes in CScreenSong.cs Fixed song name if Highscore was opened from song screen, but multiple rounds was played before. Two further updates to the changes made to CScreenSong.cs. --- Vocaluxe/Screens/CScreenHighscore.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Vocaluxe/Screens/CScreenHighscore.cs b/Vocaluxe/Screens/CScreenHighscore.cs index 5e39e45d..2b838de9 100644 --- a/Vocaluxe/Screens/CScreenHighscore.cs +++ b/Vocaluxe/Screens/CScreenHighscore.cs @@ -243,7 +243,7 @@ namespace Vocaluxe.Screens _FromScreenSong = true; _Round = (int)EGameMode.TR_GAMEMODE_NORMAL; _Scores = new List[4]; - int songID = CSongs.VisibleSongs[CScreenSong.getSelectedSongID()].ID; + int songID = CScreenSong.getSelectedSongID(); EHighscoreStyle style = CBase.Config.GetHighscoreStyle(); for (int gameModeNum = 0; gameModeNum < 4; gameModeNum++) @@ -272,7 +272,7 @@ namespace Vocaluxe.Screens CSong song; if (_FromScreenSong) - song = CSongs.GetSong(CSongs.VisibleSongs[CScreenSong.getSelectedSongID()].ID); + song = CSongs.GetSong(CScreenSong.getSelectedSongID()); else song = CGame.GetSong(_Round); @@ -280,7 +280,7 @@ namespace Vocaluxe.Screens return; _Texts[_TextSongName].Text = song.Artist + " - " + song.Title; - if (points != null && points.NumRounds > 1) + if (points != null && !_FromScreenSong && points.NumRounds > 1) _Texts[_TextSongName].Text += " (" + (_Round + 1) + "/" + points.NumRounds + ")"; switch ((_FromScreenSong ? (EGameMode)_Round : CGame.GetGameMode(_Round))) From 46351eb2078588e99b3d6c6a63b4ae6e602c1ba8 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 25 Jan 2020 08:27:44 +0100 Subject: [PATCH 24/59] Added Highscore button / fixed Highscore if come back from names screen --- Vocaluxe/Screens/CScreenSong.cs | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index 8fc5e986..0982a958 100644 --- a/Vocaluxe/Screens/CScreenSong.cs +++ b/Vocaluxe/Screens/CScreenSong.cs @@ -42,7 +42,7 @@ namespace Vocaluxe.Screens // Version number for theme files. Increment it, if you've changed something on the theme files! protected override int _ScreenVersion { - get { return 7; } + get { return 8; } } private const string _TextCategory = "TextCategory"; @@ -66,6 +66,7 @@ namespace Vocaluxe.Screens private const string _ButtonOptionsRandomMedley = "ButtonOptionsRandomMedley"; private const string _ButtonOptionsStartMedley = "ButtonOptionsStartMedley"; private const string _ButtonStart = "ButtonStart"; + private const string _ButtonOptionsHighscore = "ButtonOptionsHighscore"; private const string _SelectSlideOptionsMode = "SelectSlideOptionsMode"; private const string _SelectSlideOptionsPlaylistAdd = "SelectSlideOptionsPlaylistAdd"; @@ -142,6 +143,7 @@ namespace Vocaluxe.Screens blist.Add(_ButtonStart); blist.Add(_ButtonOptionsRandomMedley); blist.Add(_ButtonOptionsStartMedley); + blist.Add(_ButtonOptionsHighscore); _TextsPlayer.Clear(); for (int i = 0; i < CSettings.MaxNumPlayer; i++) @@ -319,8 +321,7 @@ namespace Vocaluxe.Screens case Keys.H: if (keyEvent.Mod == EModifier.Ctrl && CSongs.NumSongsVisible > 0 && !_Sso.Selection.PartyMode) { - CScreenSong.setStaticSelectedSongID(_SongMenu.GetPreviewSongNr()); - CBase.Graphics.FadeTo(EScreen.Highscore); + _ShowHighscore(); } break; } @@ -420,6 +421,10 @@ namespace Vocaluxe.Screens _ToggleSongOptions(ESongOptionsView.None); _StartRandomMedley(_SelectSlides[_SelectSlideOptionsNumMedleySongs].Selection + 1, !CSongs.IsInCategory); } + else if (_Buttons[_ButtonOptionsHighscore].Selected) + { + _ShowHighscore(); + } break; case Keys.Escape: @@ -595,6 +600,10 @@ namespace Vocaluxe.Screens _StartRandomMedley(_SelectSlides[_SelectSlideOptionsNumMedleySongs].Selection + 1, !CSongs.IsInCategory); return true; } + else if (_Buttons[_ButtonOptionsHighscore].Selected) + { + _ShowHighscore(); + } else if (_Sso.Selection.RandomOnly && _Sso.Selection.NumJokers != null) { if (_Buttons[_ButtonStart].Selected) @@ -884,6 +893,13 @@ namespace Vocaluxe.Screens } } + private void _ShowHighscore() + { + CGame.ClearSongs(); + CScreenSong.setStaticSelectedSongID(CSongs.VisibleSongs[_SongMenu.GetPreviewSongNr()].ID); + CBase.Graphics.FadeTo(EScreen.Highscore); + } + private void _StartSong(int songNr) { if (CSongs.IsInCategory && (songNr >= 0)) @@ -1205,6 +1221,7 @@ namespace Vocaluxe.Screens _Buttons[_ButtonOptionsOpenSelectedItem].Visible = false; _Buttons[_ButtonOptionsRandomMedley].Visible = false; _Buttons[_ButtonOptionsStartMedley].Visible = false; + _Buttons[_ButtonOptionsHighscore].Visible = false; _Texts[_TextOptionsTitle].Visible = false; _Statics[_StaticOptionsBG].Visible = false; _Buttons[_ButtonOpenOptions].Visible = true; @@ -1261,6 +1278,7 @@ namespace Vocaluxe.Screens _SelectSlides[_SelectSlideOptionsPlaylistAdd].Visible = true; _Buttons[_ButtonOptionsSing].Visible = true; _Buttons[_ButtonOptionsPlaylist].Visible = true; + _Buttons[_ButtonOptionsHighscore].Visible = true; _SelectElement(_Buttons[_ButtonOptionsSing]); _SetSelectSlidePlaylistToCurrentPlaylist(); } From 1ddcf765f335ab713643f45a12d67a2117e2daf4 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 25 Jan 2020 08:33:11 +0100 Subject: [PATCH 25/59] Change: Only touch the preview player if necessary Complete change of LoadPreview() to prevent touching the preview player, if we don't want to change anything. Maybe this change break something, but after 2 hours of testing with different settings, everything seems to work here. --- Vocaluxe/Base/CBackgroundMusic.cs | 61 ++++++++++--------------------- 1 file changed, 19 insertions(+), 42 deletions(-) diff --git a/Vocaluxe/Base/CBackgroundMusic.cs b/Vocaluxe/Base/CBackgroundMusic.cs index 5050b408..44295ce2 100644 --- a/Vocaluxe/Base/CBackgroundMusic.cs +++ b/Vocaluxe/Base/CBackgroundMusic.cs @@ -316,56 +316,33 @@ namespace Vocaluxe.Base CSound.SetGlobalVolume(CConfig.PreviewMusicVolume); } + //Change song position only if song is changed or near to end bool songChanged = _CurPlayer.SongID != song.ID; + if (!songChanged && _CurPlayer.Position + 30 < _CurPlayer.Length) + return; _PreviewPlayer.Load(song); - - //Change song position only if song is changed or near to end - if (songChanged || _CurPlayer.Position + 30 < _CurPlayer.Length || _PreviewStartHelperTask == null) + lock (_PreviewStartHelperTaskLock) { - lock (_PreviewStartHelperTaskLock) + _PreviewStartHelperTask = new Task(() => { - _PreviewStartHelperTask = new Task(() => - { - float length = _PreviewPlayer.Length; - if (length < 1) - length = 30; // If length is unknow or invalid assume a length of 30s + float length = _PreviewPlayer.Length; + if (length < 1) + length = 30; // If length is unknow or invalid assume a length of 30s - if (start < 0) - start = (song.Preview.Source == EDataSource.None) ? length / 4f : song.Preview.StartTime; - if (start > length - 5f) - start = Math.Max(0f, Math.Min(length / 4f, length - 5f)); - if (start >= 0.5f) - start -= 0.5f; + if (start < 0) + start = (song.Preview.Source == EDataSource.None) ? length / 4f : song.Preview.StartTime; + if (start > length - 5f) + start = Math.Max(0f, Math.Min(length / 4f, length - 5f)); + if (start >= 0.5f) + start -= 0.5f; - _PreviewPlayer.Position = start; - Play(); - }); - } - _CurPlayer = _PreviewPlayer; + _PreviewPlayer.Position = start; + Play(); + }); } - else - { - if (_PreviewStartHelperTask != null) - { - lock (_PreviewStartHelperTaskLock) - { - // Recheck the condition as it cloud have change before we got the lock - if (_PreviewStartHelperTask != null) - { - _PreviewStartHelperTask = null; - } - } - } - _PreviewPlayer.Position = _CurPlayer.Position; - _CurPlayer = _PreviewPlayer; - Play(); - } - - - - + _CurPlayer = _PreviewPlayer; } public static void StopPreview() @@ -460,4 +437,4 @@ namespace Vocaluxe.Base return _BGMusicFiles.Contains(element); } } -} \ No newline at end of file +} From b4d2176600c78a528ca44f207c3117cb6f37dc03 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 25 Jan 2020 08:35:04 +0100 Subject: [PATCH 26/59] Prevent short music break while loading the Highscore --- VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs b/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs index 1a173393..f02a7e44 100644 --- a/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs +++ b/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs @@ -220,7 +220,7 @@ namespace VocaluxeLib.Menu.SongMenu EScreen check = CBase.Graphics.GetNextScreenType(); if (CBase.Graphics.GetNextScreenType() == EScreen.Sing) _ResetPreview(false); - else if (CBase.Graphics.GetNextScreenType() != EScreen.Names || CBase.Config.GetBackgroundMusicStatus() == EBackgroundMusicOffOn.TR_CONFIG_OFF) + else if ((CBase.Graphics.GetNextScreenType() != EScreen.Names && CBase.Graphics.GetNextScreenType() != EScreen.Highscore) || CBase.Config.GetBackgroundMusicStatus() == EBackgroundMusicOffOn.TR_CONFIG_OFF) _ResetPreview(); } From 6dae65daad40c4590546365089dfd7a18da84cf1 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 25 Jan 2020 08:38:40 +0100 Subject: [PATCH 27/59] Added Highscore button --- Output/Themes/Genius/Screens/ScreenSong.xml | 29 ++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/Output/Themes/Genius/Screens/ScreenSong.xml b/Output/Themes/Genius/Screens/ScreenSong.xml index f7d55aaf..cda40b36 100644 --- a/Output/Themes/Genius/Screens/ScreenSong.xml +++ b/Output/Themes/Genius/Screens/ScreenSong.xml @@ -2,7 +2,7 @@ ScreenSong - 7 + 8 @@ -788,6 +788,33 @@ TR_SCREENSONG_BUTTON_STARTMEDLEY + From 15afc5e07bc9538e281fd305d3d4eb1af53d99e5 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 25 Jan 2020 09:11:33 +0100 Subject: [PATCH 28/59] Switch to game mode with highscore entries If Highscores will be opened from song screen, switch to the first game mode with highscore entries. --- Vocaluxe/Screens/CScreenHighscore.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Vocaluxe/Screens/CScreenHighscore.cs b/Vocaluxe/Screens/CScreenHighscore.cs index 2b838de9..19769991 100644 --- a/Vocaluxe/Screens/CScreenHighscore.cs +++ b/Vocaluxe/Screens/CScreenHighscore.cs @@ -245,10 +245,16 @@ namespace Vocaluxe.Screens _Scores = new List[4]; int songID = CScreenSong.getSelectedSongID(); EHighscoreStyle style = CBase.Config.GetHighscoreStyle(); + bool foundHighscoreEntries = false; for (int gameModeNum = 0; gameModeNum < 4; gameModeNum++) { _Scores[gameModeNum] = CDataBase.LoadScore(songID, (EGameMode)gameModeNum, style); + if (!foundHighscoreEntries && _Scores[gameModeNum].Count > 0) + { + _Round = gameModeNum; + foundHighscoreEntries = true; + } } } else From 134d0b5ab2e934f580263fbd31402168d04c0449 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 26 Jan 2020 11:06:41 +0100 Subject: [PATCH 29/59] Change sort options on the song screen (key shortcuts) CTRL+# (0-9) to switch sorting. CTRL+T to enable/disable category view. --- Vocaluxe/Screens/CScreenSong.cs | 82 ++++++++++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 2 deletions(-) diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index cf0e1183..ec94a340 100644 --- a/Vocaluxe/Screens/CScreenSong.cs +++ b/Vocaluxe/Screens/CScreenSong.cs @@ -19,6 +19,7 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; +using System.Timers; using System.Windows.Forms; using Vocaluxe.Base; using VocaluxeLib; @@ -42,7 +43,7 @@ namespace Vocaluxe.Screens // Version number for theme files. Increment it, if you've changed something on the theme files! protected override int _ScreenVersion { - get { return 7; } + get { return 8; } } private const string _TextCategory = "TextCategory"; @@ -53,6 +54,7 @@ namespace Vocaluxe.Screens private const string _TextHelpBarSearch = "TextHelpBarSearch"; private const string _TextHelpBarParty = "TextHelpBarParty"; private const string _TextOptionsTitle = "TextOptionsTitle"; + private const string _TextShortInfoTop = "TextShortInfoTop"; private const string _ButtonOpenOptions = "ButtonOpenOptions"; private const string _ButtonOptionsSing = "ButtonOptionsSing"; @@ -74,6 +76,7 @@ namespace Vocaluxe.Screens private const string _StaticSearchBar = "StaticSearchBar"; private const string _StaticOptionsBG = "StaticOptionsBG"; + private const string _StaticShortInfoTop = "StaticShortInfoTop"; private const string _SongMenuName = "SongMenu"; private const string _PlaylistName = "Playlist"; @@ -99,6 +102,8 @@ namespace Vocaluxe.Screens private ISongMenu _SongMenu; private CPlaylist _Playlist; + private System.Timers.Timer _TimerShortInfoText; + public override EMusicType CurrentMusicType { get { return CSongs.IsInCategory ? EMusicType.Preview : EMusicType.Background; } @@ -144,8 +149,9 @@ namespace Vocaluxe.Screens tlist.Add(_TextHelpBarSearch); tlist.Add(_TextHelpBarParty); tlist.Add(_TextOptionsTitle); + tlist.Add(_TextShortInfoTop); - _ThemeStatics = new string[] {_StaticSearchBar, _StaticOptionsBG}; + _ThemeStatics = new string[] {_StaticSearchBar, _StaticOptionsBG, _StaticShortInfoTop}; _ThemeTexts = tlist.ToArray(); _ThemeButtons = blist.ToArray(); _ThemeSelectSlides = new string[] {_SelectSlideOptionsMode, _SelectSlideOptionsPlaylistAdd, _SelectSlideOptionsPlaylistOpen, _SelectSlideOptionsNumMedleySongs}; @@ -153,6 +159,10 @@ namespace Vocaluxe.Screens _ThemePlaylists = new string[] {_PlaylistName}; _DragAndDropCover = GetNewStatic(); + + _TimerShortInfoText = new System.Timers.Timer(5000); + _TimerShortInfoText.AutoReset = false; + _TimerShortInfoText.Elapsed += OnTimedEventShortInfoText; } protected override void _OnSongMenuChanged() @@ -303,6 +313,35 @@ namespace Vocaluxe.Screens if (keyEvent.Mod == EModifier.Ctrl && CSongs.NumSongsVisible > 0 && !_Sso.Selection.PartyMode) _StartMedleySong(_SongMenu.GetPreviewSongNr()); break; + + case Keys.T: + if (keyEvent.Mod == EModifier.Ctrl && !_Sso.Selection.PartyMode) + { + _ToggleTabs(); + } + break; + + case Keys.D0: + case Keys.D1: + case Keys.D2: + case Keys.D3: + case Keys.D4: + case Keys.D5: + case Keys.D6: + case Keys.D7: + case Keys.D8: + case Keys.D9: + if (keyEvent.Mod == EModifier.Ctrl && !_Sso.Selection.PartyMode) + { + int tempSortNr = -1; + int.TryParse(keyEvent.Key.ToString().Substring(1), out tempSortNr); + + if (tempSortNr == 0) + tempSortNr = 10; + + _ToggleSort(tempSortNr); + } + break; } if (!_SearchActive) { @@ -689,6 +728,9 @@ namespace Vocaluxe.Screens _DragAndDropCover.Visible = false; _Playlist.DragAndDropSongID = -1; + _Statics[_StaticShortInfoTop].Visible = false; + _Texts[_TextShortInfoTop].Visible = false; + UpdateGame(); } @@ -864,6 +906,42 @@ namespace Vocaluxe.Screens } } + private void _ToggleSort(int sortNr) + { + CSongs.Sorter.SongSorting = (ESongSorting)sortNr; + CConfig.Config.Game.SongSorting = CSongs.Sorter.SongSorting; + _Sso.Sorting.SongSorting = CSongs.Sorter.SongSorting; + _SongMenu.Update(_Sso); + _SongMenu.OnShow(); + + _Texts[_TextShortInfoTop].Text = CBase.Language.Translate("TR_SCREENSONG_SORTING").Replace("%s", CBase.Language.Translate(_Sso.Sorting.SongSorting.ToString())); + _Statics[_StaticShortInfoTop].Visible = true; + _Texts[_TextShortInfoTop].Visible = true; + _TimerShortInfoText.Stop(); + _TimerShortInfoText.Enabled = true; + } + + private void OnTimedEventShortInfoText(Object source, ElapsedEventArgs e) + { + _Statics[_StaticShortInfoTop].Visible = false; + _Texts[_TextShortInfoTop].Visible = false; + } + + private void _ToggleTabs() + { + EOffOn tmpStatus = CSongs.Categorizer.Tabs; + + if (tmpStatus == EOffOn.TR_CONFIG_ON) + CSongs.Categorizer.Tabs = EOffOn.TR_CONFIG_OFF; + else + CSongs.Categorizer.Tabs = EOffOn.TR_CONFIG_ON; + + CConfig.Config.Game.Tabs = CSongs.Categorizer.Tabs; + _Sso.Sorting.Tabs = CSongs.Categorizer.Tabs; + _SongMenu.Update(_Sso); + _SongMenu.OnShow(); + } + private void _StartSong(int songNr) { if (CSongs.IsInCategory && (songNr >= 0)) From b28614f58bcf4c57455593ea420d11d5b3a93b9e Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 26 Jan 2020 11:08:37 +0100 Subject: [PATCH 30/59] Change song sorting on song screen --- Output/Themes/Genius/Screens/ScreenSong.xml | 27 ++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/Output/Themes/Genius/Screens/ScreenSong.xml b/Output/Themes/Genius/Screens/ScreenSong.xml index f7d55aaf..e8c5ed6f 100644 --- a/Output/Themes/Genius/Screens/ScreenSong.xml +++ b/Output/Themes/Genius/Screens/ScreenSong.xml @@ -2,7 +2,7 @@ ScreenSong - 7 + 8 @@ -70,8 +70,33 @@ -2.1 + + + + + 490 + 0 + 300 + 30 + -0.75 + + + + 640 + 2 + -1 + 25 + 280 + + + Center + Center + + Outline + TR_SCREENSONG_SORTING + 950 65 From 2019dd64e630ca158e8dc6b26c475125aaecaf99 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 26 Jan 2020 11:09:46 +0100 Subject: [PATCH 31/59] Add text for song sorting on song screen --- Output/Languages/English.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Output/Languages/English.xml b/Output/Languages/English.xml index a67b1462..c9c92bf7 100644 --- a/Output/Languages/English.xml +++ b/Output/Languages/English.xml @@ -152,9 +152,10 @@ (%v songs) (%v song) %a - %t - A-Z = Jump to the letter • F3 = Search • CTRL+R = Random selection • CTRL+S = Start medley • CTRL+A = Start all random • CTRL+V = Start visible random • Space = Open song options • ESC = Back to main menu + A-Z = Jump to the letter • F3 = Search • CTRL+R = Random selection • CTRL+S = Start medley • CTRL+# = Change song sorting • CTRL+T = Enable/Disable categories • Space = Open song options • ESC = Back to main menu A-Z = Search artist and title, prefixes for the search → a: = artist • t: = title • c: = creator • e: = edition • g: = genre • y: = year (e.g. 1999 or 1980-1989) • l: = language • al: = album • fi: = file name • fo: = folder name 1-6 = Press your team number to use a random song joker + Sorting: %s Pause Stop singing Continue From 51784a1a37b497c3d034d49b5a820696b0a1e6af Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 26 Jan 2020 11:10:55 +0100 Subject: [PATCH 32/59] Add text for song sorting on song screen --- Output/Languages/German.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Output/Languages/German.xml b/Output/Languages/German.xml index c630ba1b..dc0fc2d1 100644 --- a/Output/Languages/German.xml +++ b/Output/Languages/German.xml @@ -147,9 +147,10 @@ (%v Lieder) (%v Lied) %a -%t - A-Z = Zum Buchstaben springen • F3 = Suchen • STRG+R = Zufällige Auswahl • STRG+S = Starte Medley • STRG+A = Alle zufällig starten • STRG+V = Sichtbare zufällig starten • Leertaste = Lied-Optionen öffnen • ESC = Zurück zum Hauptmenü + A-Z = Zum Buchstaben springen • F3 = Suchen • STRG+R = Zufällige Auswahl • STRG+S = Starte Medley • STRG+# = Song Sortierung ändern • STRG+T = Kategorieansicht ein-/ausschalten • Leertaste = Lied-Optionen öffnen • ESC = Zurück zum Hauptmenü A-Z = Interpreten und Titel durchsuchen, Präfixe für die Suche → a: = Interpret • t: = Titel • c: = Ersteller • e: = Edition • g: = Genre • y: = Jahr (z.B. 1999 oder 1980-1989) • l: = Sprache • al: = Album • fi: = Dateiname • fo: = Ordnername 1-6 = Drücke die Teamnummer um einen Zufallssong Joker zu verwenden + Sortierung: %s Pause Lied beenden Fortfahren From 5dda7ce6c67082d89c5f5b9219f53aa10ba82405 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 26 Jan 2020 11:13:43 +0100 Subject: [PATCH 33/59] Add text for song sorting on song screen --- Output/Languages/English.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Output/Languages/English.xml b/Output/Languages/English.xml index c9c92bf7..fc7a4ca2 100644 --- a/Output/Languages/English.xml +++ b/Output/Languages/English.xml @@ -152,7 +152,7 @@ (%v songs) (%v song) %a - %t - A-Z = Jump to the letter • F3 = Search • CTRL+R = Random selection • CTRL+S = Start medley • CTRL+# = Change song sorting • CTRL+T = Enable/Disable categories • Space = Open song options • ESC = Back to main menu + A-Z = Jump to the letter • F3 = Search • CTRL+R = Random selection • CTRL+S = Start medley • CTRL+# = Change song sorting • CTRL+T = Enable/Disable category view • Space = Open song options • ESC = Back to main menu A-Z = Search artist and title, prefixes for the search → a: = artist • t: = title • c: = creator • e: = edition • g: = genre • y: = year (e.g. 1999 or 1980-1989) • l: = language • al: = album • fi: = file name • fo: = folder name 1-6 = Press your team number to use a random song joker Sorting: %s From 4e744c1c23c1d84b087db75b9edb55c6601e860e Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 26 Jan 2020 15:25:59 +0100 Subject: [PATCH 34/59] Allow song reloading from disk also for duet game mode --- 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 8c01fc55..2d3f3a75 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -1094,7 +1094,7 @@ namespace Vocaluxe.Screens return; } - if (!_Sso.Selection.PartyMode && CGame.GameMode == EGameMode.TR_GAMEMODE_NORMAL) + if (!_Sso.Selection.PartyMode && (CGame.GameMode == EGameMode.TR_GAMEMODE_NORMAL || CGame.GameMode == EGameMode.TR_GAMEMODE_DUET)) song.ReloadSong(reloadNotes); string songname = song.Artist + " - " + song.Title; From 08daa959c17c1ba401e32e9f70ea08ec3c4d961b Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 26 Jan 2020 18:19:55 +0100 Subject: [PATCH 35/59] Leave category on changing sort order using hotkeys --- Vocaluxe/Screens/CScreenSong.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index 518f61bb..730f52f8 100644 --- a/Vocaluxe/Screens/CScreenSong.cs +++ b/Vocaluxe/Screens/CScreenSong.cs @@ -937,9 +937,15 @@ namespace Vocaluxe.Screens private void _ToggleSort(int sortNr) { + if (CBase.Songs.IsInCategory() && _Sso.Selection.CategoryChangeAllowed) + { + CBase.Songs.SetCategory(-1); + } + CSongs.Sorter.SongSorting = (ESongSorting)sortNr; CConfig.Config.Game.SongSorting = CSongs.Sorter.SongSorting; _Sso.Sorting.SongSorting = CSongs.Sorter.SongSorting; + _SongMenu.Update(_Sso); _SongMenu.OnShow(); From 4da275a74d833a5277562df550b2dd371355e91d Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 26 Jan 2020 19:47:29 +0100 Subject: [PATCH 36/59] Reverse list on song sorting DATE ADDED --- Vocaluxe/Base/CSongSorter.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Vocaluxe/Base/CSongSorter.cs b/Vocaluxe/Base/CSongSorter.cs index 8a956107..318ba811 100644 --- a/Vocaluxe/Base/CSongSorter.cs +++ b/Vocaluxe/Base/CSongSorter.cs @@ -181,8 +181,12 @@ namespace Vocaluxe.Base sortList.Sort(_SortByFieldArtistTitle); break; } + + if (_SongSorting == ESongSorting.TR_CONFIG_DATEADDED) + sortList.Reverse(); + _SortedSongs = sortList.ToArray(); _Changed = false; } } -} \ No newline at end of file +} From 79225bfae98ba2823e8ce9781a382848e3ca2a2a Mon Sep 17 00:00:00 2001 From: Stefan Date: Mon, 27 Jan 2020 07:45:11 +0100 Subject: [PATCH 37/59] Use page up/down to fast scroll the song screen CTRL+Page Up/Down to go to first or last entry. Page Up/Down to scroll one page up/down. Only allowed if category / tabs view is disabled (because both keys have different functions in it). --- Vocaluxe/Screens/CScreenSong.cs | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index 730f52f8..42ddb6ac 100644 --- a/Vocaluxe/Screens/CScreenSong.cs +++ b/Vocaluxe/Screens/CScreenSong.cs @@ -363,6 +363,38 @@ namespace Vocaluxe.Screens _ShowHighscore(); } break; + + case Keys.PageUp: + if (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF) + { + int numSongsPerPage = (CConfig.SongMenu == ESongMenu.TR_CONFIG_TILE_BOARD ? 24 : 15); + if (keyEvent.Mod == EModifier.Ctrl) + _SongMenu.SetSelectedSong(0); + else + { + if ((_SongMenu.GetSelectedSongNr() - numSongsPerPage) <= 0) + _SongMenu.SetSelectedSong(0); + else + _SongMenu.SetSelectedSong(_SongMenu.GetSelectedSongNr() - numSongsPerPage); + } + } + break; + + case Keys.PageDown: + if (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF) + { + int numSongsPerPage = (CConfig.SongMenu == ESongMenu.TR_CONFIG_TILE_BOARD ? 24 : 15); + if (keyEvent.Mod == EModifier.Ctrl) + _SongMenu.SetSelectedSong(CSongs.NumSongsVisible - 1); + else + { + if ((_SongMenu.GetSelectedSongNr() + numSongsPerPage) >= CSongs.NumSongsVisible) + _SongMenu.SetSelectedSong(CSongs.NumSongsVisible - 1); + else + _SongMenu.SetSelectedSong(_SongMenu.GetSelectedSongNr() + numSongsPerPage); + } + } + break; } if (!_SearchActive) { From 8c1be1d90d41408ccbd25dd582f723d8b1b0015f Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 28 Jan 2020 06:25:18 +0100 Subject: [PATCH 38/59] Update Readme.txt Added new key shortcuts. --- Output/Readme.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Output/Readme.txt b/Output/Readme.txt index 13d36037..490e2d1a 100644 --- a/Output/Readme.txt +++ b/Output/Readme.txt @@ -132,12 +132,17 @@ Song screen [F3] to open/close the song search menu [SPACE] to open/close the song menu [TAB] to switch selection of song menu and playlist (if opened) +[CTRL] + [H] to show the highscore of the selected song +[CTRL] + [T] to toggle category / tabs view +[CTRL] + [#] to change the song sorting (just changed for runtime, not saved!), in order from keys 1 to 0: + folder, artist, artist by letter, title by letter, edition, genre, language, year, decade, date added [CTRL] + [R] to select a random song [CTRL] + [A] to sing all songs [CTRL] + [S] to sing current song in medley version [CTRL] + [V] to sing all songs from a category [NUM_1]..[NUM_6] to use a Joker for team 1..6 -[A]..[Z] to jump to category/song title starting with that letter +[A]..[Z] to jump to category/song title starting with that letters (multiple letters possible) +[PAGE UP] or [PAGE DOWN] if inside a category: Go up/down one category / if category view is disabled: Scroll one page up/down Name selection screen [1]..[6] to activate player selection. @@ -149,6 +154,7 @@ Name selection screen Sing screen [P] to toggle pause. [CTRL] + [S] to skip a song if there is another one in the playlist. +[CTRL] + [RIGHT] to skip 30 seconds within the playing song (not in party modes). [T] to change the time format of the timer. [I] to change view of player information. [W] to activate the configured webcam. @@ -156,6 +162,7 @@ Sing screen Score and highscore screen [LEFT] or [RIGHT] to show (high)scores of another round (if there is more than one) + if opened from song list screen: Switch between game modes (Normal, Medley, Duet, Short) ================================= From bc7ca45763253f59256a32b264cd186e817dd4e7 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 28 Jan 2020 06:28:00 +0100 Subject: [PATCH 39/59] Update Readme.txt --- Output/Readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Output/Readme.txt b/Output/Readme.txt index 490e2d1a..89d3ff6f 100644 --- a/Output/Readme.txt +++ b/Output/Readme.txt @@ -134,7 +134,7 @@ Song screen [TAB] to switch selection of song menu and playlist (if opened) [CTRL] + [H] to show the highscore of the selected song [CTRL] + [T] to toggle category / tabs view -[CTRL] + [#] to change the song sorting (just changed for runtime, not saved!), in order from keys 1 to 0: +[CTRL] + [1...0] to change the song sorting (just changed for runtime, not saved!), in order from keys 1 to 0: folder, artist, artist by letter, title by letter, edition, genre, language, year, decade, date added [CTRL] + [R] to select a random song [CTRL] + [A] to sing all songs From 354b767436560fc3233b3374622343e670c131d5 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 28 Jan 2020 06:28:39 +0100 Subject: [PATCH 40/59] Update Readme.txt --- Output/Readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Output/Readme.txt b/Output/Readme.txt index 89d3ff6f..203c95f4 100644 --- a/Output/Readme.txt +++ b/Output/Readme.txt @@ -134,7 +134,7 @@ Song screen [TAB] to switch selection of song menu and playlist (if opened) [CTRL] + [H] to show the highscore of the selected song [CTRL] + [T] to toggle category / tabs view -[CTRL] + [1...0] to change the song sorting (just changed for runtime, not saved!), in order from keys 1 to 0: +[CTRL] + [1..0] to change the song sorting (just changed for runtime, not saved!), in order from keys 1 to 0: folder, artist, artist by letter, title by letter, edition, genre, language, year, decade, date added [CTRL] + [R] to select a random song [CTRL] + [A] to sing all songs From 826852bbc6e1547591d7bad84e1345c01984b1a1 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 28 Jan 2020 06:30:56 +0100 Subject: [PATCH 41/59] Update Readme.txt --- Output/Readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Output/Readme.txt b/Output/Readme.txt index 203c95f4..cf86550d 100644 --- a/Output/Readme.txt +++ b/Output/Readme.txt @@ -134,7 +134,7 @@ Song screen [TAB] to switch selection of song menu and playlist (if opened) [CTRL] + [H] to show the highscore of the selected song [CTRL] + [T] to toggle category / tabs view -[CTRL] + [1..0] to change the song sorting (just changed for runtime, not saved!), in order from keys 1 to 0: +[CTRL] + [1]..[0] to change the song sorting (just changed for runtime, not saved!), in order from keys 1 to 0: folder, artist, artist by letter, title by letter, edition, genre, language, year, decade, date added [CTRL] + [R] to select a random song [CTRL] + [A] to sing all songs From 781026dc7ac1031440721fd496821117eb89fbb4 Mon Sep 17 00:00:00 2001 From: Stefan Date: Wed, 29 Jan 2020 08:29:59 +0100 Subject: [PATCH 42/59] Remove PAGE UP/DOWN, moved to another class --- Vocaluxe/Screens/CScreenSong.cs | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index 42ddb6ac..730f52f8 100644 --- a/Vocaluxe/Screens/CScreenSong.cs +++ b/Vocaluxe/Screens/CScreenSong.cs @@ -363,38 +363,6 @@ namespace Vocaluxe.Screens _ShowHighscore(); } break; - - case Keys.PageUp: - if (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF) - { - int numSongsPerPage = (CConfig.SongMenu == ESongMenu.TR_CONFIG_TILE_BOARD ? 24 : 15); - if (keyEvent.Mod == EModifier.Ctrl) - _SongMenu.SetSelectedSong(0); - else - { - if ((_SongMenu.GetSelectedSongNr() - numSongsPerPage) <= 0) - _SongMenu.SetSelectedSong(0); - else - _SongMenu.SetSelectedSong(_SongMenu.GetSelectedSongNr() - numSongsPerPage); - } - } - break; - - case Keys.PageDown: - if (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF) - { - int numSongsPerPage = (CConfig.SongMenu == ESongMenu.TR_CONFIG_TILE_BOARD ? 24 : 15); - if (keyEvent.Mod == EModifier.Ctrl) - _SongMenu.SetSelectedSong(CSongs.NumSongsVisible - 1); - else - { - if ((_SongMenu.GetSelectedSongNr() + numSongsPerPage) >= CSongs.NumSongsVisible) - _SongMenu.SetSelectedSong(CSongs.NumSongsVisible - 1); - else - _SongMenu.SetSelectedSong(_SongMenu.GetSelectedSongNr() + numSongsPerPage); - } - } - break; } if (!_SearchActive) { From a8d0a2317e5cb7688766caf33f63d7e11d2c6911 Mon Sep 17 00:00:00 2001 From: Stefan Date: Wed, 29 Jan 2020 08:37:46 +0100 Subject: [PATCH 43/59] Added HOME / END key support, extended Page UP/DOWN key support --- VocaluxeLib/Menu/SongMenu/CSongMenuList.cs | 38 ++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs b/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs index 0221206d..b2cb4f86 100644 --- a/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs +++ b/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs @@ -344,19 +344,53 @@ namespace VocaluxeLib.Menu.SongMenu break; case Keys.PageUp: - if (catChangePossible) + if (catChangePossible && CBase.Songs.IsInCategory() && (keyEvent.Mod == EModifier.Ctrl || keyEvent.Mod == EModifier.Alt)) { _PrevCategory(); keyEvent.Handled = true; } + else if (moveAllowed) + { + if ((_SelectionNr - _ListLength) <= 0) + _SelectionNr = 0; + else + _SelectionNr = _SelectionNr - _ListLength; + keyEvent.Handled = true; + } break; case Keys.PageDown: - if (catChangePossible) + if (catChangePossible && CBase.Songs.IsInCategory() && (keyEvent.Mod == EModifier.Ctrl || keyEvent.Mod == EModifier.Alt)) { _NextCategory(); keyEvent.Handled = true; } + else if (moveAllowed) + { + int maxCount_PageDown = (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && !CBase.Songs.IsInCategory() ? CBase.Songs.GetNumCategories() : CBase.Songs.GetNumSongsVisible()); + if ((_SelectionNr + _ListLength) >= maxCount_PageDown) + _SelectionNr = maxCount_PageDown - 1; + else + _SelectionNr = _SelectionNr + _ListLength; + keyEvent.Handled = true; + } + break; + + case Keys.Home: + if (moveAllowed) + { + _SelectionNr = 0; + keyEvent.Handled = true; + } + break; + + case Keys.End: + int maxCount_End = (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && !CBase.Songs.IsInCategory() ? CBase.Songs.GetNumCategories() : CBase.Songs.GetNumSongsVisible()); + if (moveAllowed) + { + _SelectionNr = maxCount_End - 1; + keyEvent.Handled = true; + } break; case Keys.Left: From d587f4073514a83cfd34bbcea667255285f22716 Mon Sep 17 00:00:00 2001 From: Stefan Date: Wed, 29 Jan 2020 08:38:34 +0100 Subject: [PATCH 44/59] Added HOME / END key support, extended Page UP/DOWN key support --- .../Menu/SongMenu/CSongMenuTileBoard.cs | 40 ++++++++++++++++++- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs b/VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs index 478c918b..8a159964 100644 --- a/VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs +++ b/VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs @@ -335,19 +335,55 @@ namespace VocaluxeLib.Menu.SongMenu break; case Keys.PageUp: - if (catChangePossible) + if (catChangePossible && CBase.Songs.IsInCategory() && (keyEvent.Mod == EModifier.Ctrl || keyEvent.Mod == EModifier.Alt)) { _PrevCategory(); keyEvent.Handled = true; } + else if (moveAllowed) + { + int numSongsPerPage = _NumH * _NumW; + if ((_SelectionNr - numSongsPerPage) <= 0) + _SelectionNr = 0; + else + _SelectionNr = _SelectionNr - numSongsPerPage; + keyEvent.Handled = true; + } break; case Keys.PageDown: - if (catChangePossible) + if (catChangePossible && CBase.Songs.IsInCategory() && (keyEvent.Mod == EModifier.Ctrl || keyEvent.Mod == EModifier.Alt)) { _NextCategory(); keyEvent.Handled = true; } + else if (moveAllowed) + { + int numSongsPerPage = _NumH * _NumW; + int maxCount_PageDown = (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && !CBase.Songs.IsInCategory() ? CBase.Songs.GetNumCategories() : CBase.Songs.GetNumSongsVisible()); + if ((_SelectionNr + numSongsPerPage) >= maxCount_PageDown) + _SelectionNr = maxCount_PageDown - 1; + else + _SelectionNr = _SelectionNr + numSongsPerPage; + keyEvent.Handled = true; + } + break; + + case Keys.Home: + if (moveAllowed) + { + _SelectionNr = 0; + keyEvent.Handled = true; + } + break; + + case Keys.End: + int maxCount_End = (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && !CBase.Songs.IsInCategory() ? CBase.Songs.GetNumCategories() : CBase.Songs.GetNumSongsVisible()); + if (moveAllowed) + { + _SelectionNr = maxCount_End - 1; + keyEvent.Handled = true; + } break; case Keys.Left: From 28a6278da3964a4f42adb53780aec6756ba347f9 Mon Sep 17 00:00:00 2001 From: Stefan Date: Wed, 29 Jan 2020 08:47:42 +0100 Subject: [PATCH 45/59] Update Readme.txt --- Output/Readme.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Output/Readme.txt b/Output/Readme.txt index cf86550d..c8437423 100644 --- a/Output/Readme.txt +++ b/Output/Readme.txt @@ -142,7 +142,9 @@ Song screen [CTRL] + [V] to sing all songs from a category [NUM_1]..[NUM_6] to use a Joker for team 1..6 [A]..[Z] to jump to category/song title starting with that letters (multiple letters possible) -[PAGE UP] or [PAGE DOWN] if inside a category: Go up/down one category / if category view is disabled: Scroll one page up/down +[PAGE UP] or [PAGE DOWN] to scroll one page up/down +[CTRL] + [PAGE UP or DOWN] to go inside next or previous category while being in a category +[HOME] or [END] to scroll up to first song or down to last song Name selection screen [1]..[6] to activate player selection. From 7838b26b0f160a6bdf7552c48bc0deee71fd454a Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 2 Feb 2020 11:39:54 +0100 Subject: [PATCH 46/59] New function to check playlist name edit state --- VocaluxeLib/Menu/CPlaylist.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/VocaluxeLib/Menu/CPlaylist.cs b/VocaluxeLib/Menu/CPlaylist.cs index 0a523d21..45517bf2 100644 --- a/VocaluxeLib/Menu/CPlaylist.cs +++ b/VocaluxeLib/Menu/CPlaylist.cs @@ -972,6 +972,11 @@ namespace VocaluxeLib.Menu return false; } + public bool isPlaylistNameEditMode() + { + return _EditMode == EEditMode.PlaylistName; + } + private void _PrepareList() { _PlaylistElements.Clear(); @@ -1197,4 +1202,4 @@ namespace VocaluxeLib.Menu } #endregion ThemeEdit } -} \ No newline at end of file +} From b3d9ce82fbb88743c6d436867ec9bfa73fcb5cb7 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 2 Feb 2020 11:42:30 +0100 Subject: [PATCH 47/59] Fix usage of space key while editing playlist names --- Vocaluxe/Screens/CScreenSong.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index 730f52f8..2981af4f 100644 --- a/Vocaluxe/Screens/CScreenSong.cs +++ b/Vocaluxe/Screens/CScreenSong.cs @@ -369,7 +369,7 @@ namespace Vocaluxe.Screens switch (keyEvent.Key) { case Keys.Space: - if (!_Sso.Selection.PartyMode) + if (!_Sso.Selection.PartyMode && !_Playlist.isPlaylistNameEditMode()) _ToggleSongOptions(ESongOptionsView.General); break; From d146a724f665c094a0057936bc8650fadfa6deed Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 2 Feb 2020 14:57:51 +0100 Subject: [PATCH 48/59] Respect IgnoreArticles setting on typing (_JumpTo) --- Vocaluxe/Screens/CScreenSong.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index 730f52f8..15649ffe 100644 --- a/Vocaluxe/Screens/CScreenSong.cs +++ b/Vocaluxe/Screens/CScreenSong.cs @@ -1202,7 +1202,7 @@ namespace Vocaluxe.Screens { case ESongSorting.TR_CONFIG_ARTIST: case ESongSorting.TR_CONFIG_ARTIST_LETTER: - visibleID = _FindIndex(songs, start, element => element.Artist.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); + visibleID = _FindIndex(songs, start, element => (_Sso.Sorting.IgnoreArticles == EOffOn.TR_CONFIG_ON ? element.ArtistSorting.StartsWith(searchString, StringComparison.OrdinalIgnoreCase) : element.Artist.StartsWith(searchString, StringComparison.OrdinalIgnoreCase))); break; case ESongSorting.TR_CONFIG_YEAR: @@ -1211,7 +1211,7 @@ namespace Vocaluxe.Screens break; case ESongSorting.TR_CONFIG_TITLE_LETTER: - visibleID = _FindIndex(songs, start, element => element.Title.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); + visibleID = _FindIndex(songs, start, element => (_Sso.Sorting.IgnoreArticles == EOffOn.TR_CONFIG_ON ? element.TitleSorting.StartsWith(searchString, StringComparison.OrdinalIgnoreCase) : element.Title.StartsWith(searchString, StringComparison.OrdinalIgnoreCase))); break; case ESongSorting.TR_CONFIG_FOLDER: @@ -1229,12 +1229,12 @@ namespace Vocaluxe.Screens { case ESongSorting.TR_CONFIG_FOLDER: case ESongSorting.TR_CONFIG_TITLE_LETTER: - visibleID = _FindIndex(songs, start, element => element.Artist.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); + visibleID = _FindIndex(songs, start, element => (_Sso.Sorting.IgnoreArticles == EOffOn.TR_CONFIG_ON ? element.ArtistSorting.StartsWith(searchString, StringComparison.OrdinalIgnoreCase) : element.Artist.StartsWith(searchString, StringComparison.OrdinalIgnoreCase))); break; case ESongSorting.TR_CONFIG_ARTIST: case ESongSorting.TR_CONFIG_ARTIST_LETTER: - visibleID = _FindIndex(songs, start, element => element.Title.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); + visibleID = _FindIndex(songs, start, element => (_Sso.Sorting.IgnoreArticles == EOffOn.TR_CONFIG_ON ? element.TitleSorting.StartsWith(searchString, StringComparison.OrdinalIgnoreCase) : element.Title.StartsWith(searchString, StringComparison.OrdinalIgnoreCase))); break; } if (visibleID > -1) From ca1b640f1fa06a4f6e69e205bee697e80a4c236f Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 2 Feb 2020 15:17:46 +0100 Subject: [PATCH 49/59] Key shortcut to show only songs of the current playlist CTRL+L while a playlist is open. It's a toggle key, just press again to return to normal list. While filtered to a playlist, you can also use CTRL+L while the playlist is not open to switch back to the normal view. My initial plans included also a button on the playlist pane, to the left of the playlist save button. I was able to add this button and set events on it. But I don't know how to filter and refresh the song screen, while I'm in the CPlaylist class of the VocaluxeLib namespace. After playing around for hours I stopped trying this and added just this key shortcut. --- Vocaluxe/Screens/CScreenSong.cs | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index 730f52f8..5ddcd5c5 100644 --- a/Vocaluxe/Screens/CScreenSong.cs +++ b/Vocaluxe/Screens/CScreenSong.cs @@ -363,6 +363,13 @@ namespace Vocaluxe.Screens _ShowHighscore(); } break; + + case Keys.L: + if (keyEvent.Mod == EModifier.Ctrl) + { + _TogglePlaylistFilter(); + } + break; } if (!_SearchActive) { @@ -869,9 +876,6 @@ namespace Vocaluxe.Screens CParty.OnSongChange(_SelectedSongID, ref _Sso); } - _Sso = CParty.GetSongSelectionOptions(); - - if (_Sso.Selection.PartyMode) { CSongs.Sort(_Sso.Sorting.SongSorting, _Sso.Sorting.Tabs, _Sso.Sorting.IgnoreArticles, _Sso.Sorting.SearchString, _Sso.Sorting.DuetOptions, _Sso.Sorting.FilterPlaylistID); @@ -1253,6 +1257,22 @@ namespace Vocaluxe.Screens _JumpTo_lastSearchString = searchString; } + public void _TogglePlaylistFilter() + { + if (_Sso.Sorting.FilterPlaylistID == _Playlist.ActivePlaylistID) + { + if (_Playlist.ActivePlaylistID == -1) + return; + + _Sso.Sorting.FilterPlaylistID = -1; + } + else + _Sso.Sorting.FilterPlaylistID = _Playlist.ActivePlaylistID; + + CSongs.Sort(_Sso.Sorting.SongSorting, _Sso.Sorting.Tabs, _Sso.Sorting.IgnoreArticles, _Sso.Sorting.SearchString, _Sso.Sorting.DuetOptions, _Sso.Sorting.FilterPlaylistID); + _SongMenu.OnShow(); + } + private void _ApplyNewSearchFilter(string newFilterString) { CParty.SetSearchString(newFilterString, _SearchActive); From b0658c1f674b023cc47e41f0388d4c75b628382d Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 2 Feb 2020 18:19:50 +0100 Subject: [PATCH 50/59] Add CTRL+L key shortcut on song screen --- Output/Readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Output/Readme.txt b/Output/Readme.txt index c8437423..23859153 100644 --- a/Output/Readme.txt +++ b/Output/Readme.txt @@ -140,6 +140,7 @@ Song screen [CTRL] + [A] to sing all songs [CTRL] + [S] to sing current song in medley version [CTRL] + [V] to sing all songs from a category +[CTRL] + [L] to filter the song list to the current displayed playlist. Press again to remove this filter. [NUM_1]..[NUM_6] to use a Joker for team 1..6 [A]..[Z] to jump to category/song title starting with that letters (multiple letters possible) [PAGE UP] or [PAGE DOWN] to scroll one page up/down From 56430234029e97747df541c9b33375c1c013e89e Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 2 Feb 2020 20:44:49 +0100 Subject: [PATCH 51/59] Added theme text for song year on song screen --- VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs b/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs index f02a7e44..e644159c 100644 --- a/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs +++ b/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs @@ -63,6 +63,7 @@ namespace VocaluxeLib.Menu.SongMenu public SThemeText TextArtist; public SThemeText TextTitle; public SThemeText TextSongLength; + public SThemeText TextSongYear; public SThemeStatic StaticCoverBig; public SThemeStatic StaticTextBG; @@ -111,6 +112,7 @@ namespace VocaluxeLib.Menu.SongMenu public SThemeText TextArtist; public SThemeText TextTitle; public SThemeText TextSongLength; + public SThemeText TextSongYear; public SThemeStatic StaticCoverBig; public SThemeStatic StaticTextBG; From 93b774bc0d6b04307c7e79fa7e73ef7b397d4f4d Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 2 Feb 2020 20:48:36 +0100 Subject: [PATCH 52/59] Display song year on song screen (list view) --- VocaluxeLib/Menu/SongMenu/CSongMenuList.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs b/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs index b2cb4f86..8f023cf4 100644 --- a/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs +++ b/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs @@ -43,6 +43,7 @@ namespace VocaluxeLib.Menu.SongMenu private readonly CText _Artist; private readonly CText _Title; private readonly CText _SongLength; + private readonly CText _SongYear; private float _SpaceW; private float _SpaceH; @@ -118,19 +119,21 @@ namespace VocaluxeLib.Menu.SongMenu _Artist = new CText(_Theme.SongMenuList.TextArtist, _PartyModeID); _Title = new CText(_Theme.SongMenuList.TextTitle, _PartyModeID); _SongLength = new CText(_Theme.SongMenuList.TextSongLength, _PartyModeID); + _SongYear = new CText(_Theme.SongMenuList.TextSongYear, _PartyModeID); _CoverBig = new CStatic(_Theme.SongMenuList.StaticCoverBig, _PartyModeID); _TextBG = new CStatic(_Theme.SongMenuList.StaticTextBG, _PartyModeID); _DuetIcon = new CStatic(_Theme.SongMenuList.StaticDuetIcon, _PartyModeID); _VideoIcon = new CStatic(_Theme.SongMenuList.StaticVideoIcon, _PartyModeID); _MedleyCalcIcon = new CStatic(_Theme.SongMenuList.StaticMedleyCalcIcon, _PartyModeID); _MedleyTagIcon = new CStatic(_Theme.SongMenuList.StaticMedleyTagIcon, _PartyModeID); - _SubElements.AddRange(new IMenuElement[] {_Artist, _Title, _SongLength, _DuetIcon, _VideoIcon, _MedleyCalcIcon, _MedleyTagIcon}); + _SubElements.AddRange(new IMenuElement[] {_Artist, _Title, _SongLength, _SongYear, _DuetIcon, _VideoIcon, _MedleyCalcIcon, _MedleyTagIcon}); } private void _ReadSubTheme() { _Theme.SongMenuList.TextArtist = (SThemeText)_Artist.GetTheme(); _Theme.SongMenuList.TextSongLength = (SThemeText)_SongLength.GetTheme(); + _Theme.SongMenuList.TextSongYear = (SThemeText)_SongYear.GetTheme(); _Theme.SongMenuList.TextTitle = (SThemeText)_Title.GetTheme(); _Theme.SongMenuList.StaticCoverBig = (SThemeStatic)_CoverBig.GetTheme(); _Theme.SongMenuList.StaticDuetIcon = (SThemeStatic)_DuetIcon.GetTheme(); @@ -217,6 +220,7 @@ namespace VocaluxeLib.Menu.SongMenu _Artist.Text = String.Empty; _Title.Text = String.Empty; _SongLength.Text = String.Empty; + _SongYear.Text = String.Empty; _DuetIcon.Visible = false; _VideoIcon.Visible = false; _MedleyCalcIcon.Visible = false; @@ -245,6 +249,7 @@ namespace VocaluxeLib.Menu.SongMenu _CoverBig.Texture = song.CoverTextureBig; _Artist.Text = song.Artist; _Title.Text = song.Title; + _SongYear.Text = song.Year; _DuetIcon.Visible = song.IsDuet; _VideoIcon.Visible = song.VideoFileName != ""; _MedleyCalcIcon.Visible = song.Medley.Source == EDataSource.Calculated; From fd4ac7b0dbb38f4a0bcbf74ffed5e305414870f8 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 2 Feb 2020 20:50:31 +0100 Subject: [PATCH 53/59] Display song year on song screen (tile view) --- VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs b/VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs index 8a159964..a5000bdf 100644 --- a/VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs +++ b/VocaluxeLib/Menu/SongMenu/CSongMenuTileBoard.cs @@ -42,6 +42,7 @@ namespace VocaluxeLib.Menu.SongMenu private CText _Artist; private CText _Title; private CText _SongLength; + private CText _SongYear; private int _NumW; private int _NumH; @@ -113,13 +114,14 @@ namespace VocaluxeLib.Menu.SongMenu _Artist = new CText(_Theme.SongMenuTileBoard.TextArtist, _PartyModeID); _Title = new CText(_Theme.SongMenuTileBoard.TextTitle, _PartyModeID); _SongLength = new CText(_Theme.SongMenuTileBoard.TextSongLength, _PartyModeID); + _SongYear = new CText(_Theme.SongMenuTileBoard.TextSongYear, _PartyModeID); _CoverBig = new CStatic(_Theme.SongMenuTileBoard.StaticCoverBig, _PartyModeID); _TextBG = new CStatic(_Theme.SongMenuTileBoard.StaticTextBG, _PartyModeID); _DuetIcon = new CStatic(_Theme.SongMenuTileBoard.StaticDuetIcon, _PartyModeID); _VideoIcon = new CStatic(_Theme.SongMenuTileBoard.StaticVideoIcon, _PartyModeID); _MedleyCalcIcon = new CStatic(_Theme.SongMenuTileBoard.StaticMedleyCalcIcon, _PartyModeID); _MedleyTagIcon = new CStatic(_Theme.SongMenuTileBoard.StaticMedleyTagIcon, _PartyModeID); - _SubElements.AddRange(new IMenuElement[] {_Artist, _Title, _SongLength, _DuetIcon, _VideoIcon, _MedleyCalcIcon, _MedleyTagIcon}); + _SubElements.AddRange(new IMenuElement[] {_Artist, _Title, _SongLength, _SongYear, _DuetIcon, _VideoIcon, _MedleyCalcIcon, _MedleyTagIcon}); } private void _UpdateTileSelection() @@ -135,6 +137,7 @@ namespace VocaluxeLib.Menu.SongMenu { _Theme.SongMenuTileBoard.TextArtist = (SThemeText)_Artist.GetTheme(); _Theme.SongMenuTileBoard.TextSongLength = (SThemeText)_SongLength.GetTheme(); + _Theme.SongMenuTileBoard.TextSongYear = (SThemeText)_SongYear.GetTheme(); _Theme.SongMenuTileBoard.TextTitle = (SThemeText)_Title.GetTheme(); _Theme.SongMenuTileBoard.StaticCoverBig = (SThemeStatic)_CoverBig.GetTheme(); _Theme.SongMenuTileBoard.StaticDuetIcon = (SThemeStatic)_DuetIcon.GetTheme(); @@ -208,6 +211,7 @@ namespace VocaluxeLib.Menu.SongMenu _Artist.Text = String.Empty; _Title.Text = String.Empty; _SongLength.Text = String.Empty; + _SongYear.Text = String.Empty; _DuetIcon.Visible = false; _VideoIcon.Visible = false; _MedleyCalcIcon.Visible = false; @@ -236,6 +240,7 @@ namespace VocaluxeLib.Menu.SongMenu _CoverBig.Texture = song.CoverTextureBig; _Artist.Text = song.Artist; _Title.Text = song.Title; + _SongYear.Text = song.Year; _DuetIcon.Visible = song.IsDuet; _VideoIcon.Visible = song.VideoFileName != ""; _MedleyCalcIcon.Visible = song.Medley.Source == EDataSource.Calculated; From e246c84eb7b965e16d00a6cccdf8434e7edf004b Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 2 Feb 2020 20:53:15 +0100 Subject: [PATCH 54/59] Added text for song year --- Output/Themes/Genius/Screens/ScreenSong.xml | 42 +++++++++++++++++---- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/Output/Themes/Genius/Screens/ScreenSong.xml b/Output/Themes/Genius/Screens/ScreenSong.xml index f5abfa40..4d69765a 100644 --- a/Output/Themes/Genius/Screens/ScreenSong.xml +++ b/Output/Themes/Genius/Screens/ScreenSong.xml @@ -2,7 +2,7 @@ ScreenSong - 8 + 9 @@ -905,19 +905,33 @@ - 222 + 391 490 -1.01 28 - 340 + 100 - Center + Right Top Outline + + 52 + 490 + -1.01 + 28 + 100 + + + Left + Top + + Outline + + @@ -1032,19 +1046,33 @@ - 222 + 391 490 -1.01 28 - 340 + 100 - Center + Right Top Outline + + 52 + 490 + -1.01 + 28 + 100 + + + Left + Top + + Outline + + From 00cd33ee2ce6ec393e6d78c8311cbafe3c127049 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 2 Feb 2020 20:54:14 +0100 Subject: [PATCH 55/59] Updated theme file --- Vocaluxe/Screens/CScreenSong.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index 1cc4abab..3f851153 100644 --- a/Vocaluxe/Screens/CScreenSong.cs +++ b/Vocaluxe/Screens/CScreenSong.cs @@ -43,7 +43,7 @@ namespace Vocaluxe.Screens // Version number for theme files. Increment it, if you've changed something on the theme files! protected override int _ScreenVersion { - get { return 8; } + get { return 9; } } private const string _TextCategory = "TextCategory"; From b18f847ea7d6286d8e9045f02087fe536eadf6e9 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 2 Feb 2020 20:59:34 +0100 Subject: [PATCH 56/59] Update Changelog_ScreenSong.txt --- .../Themes/Changelog/Changelog_ScreenSong.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Output/Themes/Changelog/Changelog_ScreenSong.txt b/Output/Themes/Changelog/Changelog_ScreenSong.txt index 89d4820b..563bd3ab 100644 --- a/Output/Themes/Changelog/Changelog_ScreenSong.txt +++ b/Output/Themes/Changelog/Changelog_ScreenSong.txt @@ -1,5 +1,22 @@ ScreenSong +++++++++++ +Version 9: + +Add: + + +Changed values at: + + +++++++++++ +Version 8: + +Add: + to SongMenu + + + ++++++++++ Version 7: From 8fd8a2d4c3a4b70a31f4c3861c5d3ad70db605ab Mon Sep 17 00:00:00 2001 From: Stefan Date: Mon, 3 Feb 2020 22:28:48 +0100 Subject: [PATCH 57/59] Button "Restart Game" and "Restart Round" using Enter key did not close the pause menu --- Vocaluxe/Screens/CScreenSing.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index 2d3f3a75..5ab5f59d 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -267,9 +267,15 @@ namespace Vocaluxe.Screens if (_Buttons[_ButtonCancel].Selected) _Stop(); if (_Buttons[_ButtonRestartGame].Selected) + { _RestartGame(); + _SetPause(false); + } if (_Buttons[_ButtonRestartRound].Selected) + { _RestartRound(); + _SetPause(false); + } if (_Buttons[_ButtonSkip].Selected) { _NextSong(); From b6afc460cf4a599a3efcb99b207da6af2e338b8b Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 4 Feb 2020 07:43:22 +0100 Subject: [PATCH 58/59] Cosmetics :) --- Vocaluxe/Base/CConfig.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index 191c41b3..8e156158 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -687,7 +687,8 @@ namespace Vocaluxe.Base foreach (string folder in Config.Game.SongFolder) { //Check if folder exists - if (Directory.Exists(folder)) { + if (Directory.Exists(folder)) + { SongFolders.Add(Path.GetFullPath(folder)); } } @@ -854,4 +855,4 @@ namespace Vocaluxe.Base } } } -} \ No newline at end of file +} From b511fafa8bd68ee07c2732bf2f6990bf168af702 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 4 Feb 2020 07:45:19 +0100 Subject: [PATCH 59/59] Cosmetics again :) --- Vocaluxe/Base/CConfig.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index 8e156158..33ce96e2 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -688,9 +688,7 @@ namespace Vocaluxe.Base { //Check if folder exists if (Directory.Exists(folder)) - { SongFolders.Add(Path.GetFullPath(folder)); - } } }