From 3bec24f4ff6d95f5ede4daac814089d0877fa8e5 Mon Sep 17 00:00:00 2001 From: lukeIam <2lukeiam@gmail.com> Date: Sat, 30 Jun 2018 11:06:50 +0200 Subject: [PATCH 01/84] Fix: Config.Video.VideoPreview is ignored (fixes #391) --- VocaluxeLib/Utils/Player/CSongPlayer.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/VocaluxeLib/Utils/Player/CSongPlayer.cs b/VocaluxeLib/Utils/Player/CSongPlayer.cs index 3ae765f4..218eef90 100644 --- a/VocaluxeLib/Utils/Player/CSongPlayer.cs +++ b/VocaluxeLib/Utils/Player/CSongPlayer.cs @@ -110,6 +110,10 @@ namespace VocaluxeLib.Utils.Player if (_Video != null || !SongHasVideo) return; + + if (CBase.Config.GetVideoPreview() == EOffOn.TR_CONFIG_OFF) + return; + string videoFilePath = Path.Combine(_Song.Folder, _Song.VideoFileName); _Video = CBase.Video.Load(videoFilePath); if (_Video == null) From b248c4b2bdbb247a66b8b1ce6846375c5b3ebf6b Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 7 Jan 2020 09:27:46 +0100 Subject: [PATCH 02/84] 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/84] 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/84] 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 60ff5d008d8b4f2873faffe99a9e2999d70a5179 Mon Sep 17 00:00:00 2001 From: Stefan Date: Wed, 8 Jan 2020 21:48:28 +0100 Subject: [PATCH 05/84] Extended search functions on song list screen (develop) On the song list screen you can activate the search function by pressing F3 or CTRL+F, even in older Vocaluxe versions. In this commit I added special keywords for this search function to allow searching just for the artist or other items, like language or genre, which can't be searched in older Vocaluxe versions. (changed file CSongFilter.cs) Use following keywords to search for a special item: a: = artists t: = title g: = genre y: = year, you can also do y:1980-1989 to find songs from the 80s l: = language c: = creator e: = edition al: = album fi: = file name fo: = folder name **Examples:** a:abba y:1980-1989 y:1999 g:rock l:german **Additional notes:** - If using this keywords, the maximum search results are limited to 200 songs. - Changed the behavior if searching without keywords: Only title and artists will be searched, removed folder and file names. --- Vocaluxe/Base/CSongFilter.cs | 165 ++++++++++++++++++++++++++++++++++- 1 file changed, 162 insertions(+), 3 deletions(-) diff --git a/Vocaluxe/Base/CSongFilter.cs b/Vocaluxe/Base/CSongFilter.cs index 20596803..acc67d2f 100644 --- a/Vocaluxe/Base/CSongFilter.cs +++ b/Vocaluxe/Base/CSongFilter.cs @@ -1,4 +1,4 @@ -#region license +#region license // This file is part of Vocaluxe. // // Vocaluxe is free software: you can redistribute it and/or modify @@ -93,6 +93,89 @@ namespace Vocaluxe.Base if (_SearchString != "") searchStrings = _SearchString.ToUpper().Split(new char[] {' '}); + String searchForArtist = null; // a: + String searchForTitle = null; // t: + String searchForGenre = null; // g: + String searchForYear = null; // y: + String searchForLanguage = null; // l: + String searchForCreator = null; // c: + String searchForEdition = null; // e: + String searchForAlbum = null; // al: + String searchForFileName = null; // fi: + String searchForFolderName = null; // fo: + bool expertSearch = false; + + if (searchStrings != null) + { + foreach (String searchToken in searchStrings) + { + if (searchToken.Length < 3) + continue; + + String temp = searchToken.Substring(0, 2); + bool foundIt = true; + + switch (temp) + { + case "A:": + searchForArtist = searchToken.Substring(2); + break; + case "T:": + searchForTitle = searchToken.Substring(2); + break; + case "G:": + searchForGenre = searchToken.Substring(2); + break; + case "Y:": + searchForYear = searchToken.Substring(2); + break; + case "L:": + searchForLanguage = searchToken.Substring(2); + break; + case "C:": + searchForCreator = searchToken.Substring(2); + break; + case "E:": + searchForEdition = searchToken.Substring(2); + break; + default: + foundIt = false; + break; + } + + if (foundIt) + { + if (!expertSearch) expertSearch = true; + continue; + } + + if (searchToken.Length < 4) + continue; + + foundIt = true; + temp = searchToken.Substring(0, 3); + + switch (temp) + { + case "AL:": + searchForAlbum = searchToken.Substring(3); + break; + case "FI:": + searchForFileName = searchToken.Substring(3); + break; + case "FO:": + searchForFolderName = searchToken.Substring(3); + break; + default: + foundIt = false; + break; + } + + if (foundIt) + if (!expertSearch) expertSearch = true; + } + } + foreach (CSong song in CSongs.Songs) { if (_PlaylistID != -1 && !CBase.Playlist.ContainsSong(_PlaylistID, song.ID)) @@ -102,9 +185,85 @@ namespace Vocaluxe.Base { if (searchStrings == null) _FilteredSongs.Add(song); + else if (expertSearch) + { + // Stefan1200: Stop at a maximum of 200 search result to prevent performance issues + if (_FilteredSongs.Count >= 200) + break; + + if (searchForAlbum != null && song.Album.ToUpper().Contains(searchForAlbum)) + _FilteredSongs.Add(song); + if (searchForArtist != null && song.Artist.ToUpper().Contains(searchForArtist)) + _FilteredSongs.Add(song); + if (searchForTitle != null && song.Title.ToUpper().Contains(searchForTitle)) + _FilteredSongs.Add(song); + if (searchForCreator != null && song.Creator.ToUpper().Contains(searchForCreator)) + _FilteredSongs.Add(song); + if (searchForFileName != null && song.FileName.ToUpper().Contains(searchForFileName)) + _FilteredSongs.Add(song); + if (searchForFolderName != null && song.FolderName.ToUpper().Contains(searchForFolderName)) + _FilteredSongs.Add(song); + + if (searchForGenre != null) + { + foreach (String genre in song.Genres) + { + if (genre.ToUpper().Contains(searchForGenre)) + _FilteredSongs.Add(song); + } + } + + if (searchForLanguage != null) + { + foreach (String language in song.Languages) + { + if (language.ToUpper().Contains(searchForLanguage)) + _FilteredSongs.Add(song); + } + } + + if (searchForEdition != null) + { + foreach (String edition in song.Editions) + { + if (edition.ToUpper().Contains(searchForEdition)) + _FilteredSongs.Add(song); + } + } + + if (searchForYear != null) + { + int pos = searchForYear.IndexOf("-"); + if (pos == -1) + { + if (song.Year.Contains(searchForYear)) + _FilteredSongs.Add(song); + } + else if (searchForYear.Length == 9) + { + int yearStart = -1; + int yearEnd = -1; + if (!Int32.TryParse(searchForYear.Substring(0, pos), out yearStart)) + continue; + if (!Int32.TryParse(searchForYear.Substring(pos + 1), out yearEnd)) + continue; + + // Stefan1200: Prevent searches like 0000-9999, limit for a max distance of 100 years + if (yearEnd - yearStart > 100) + continue; + + int yearSearch = -1; + if (!Int32.TryParse(song.Year, out yearSearch)) + continue; + + if (yearSearch >= yearStart && yearSearch <= yearEnd) + _FilteredSongs.Add(song); + } + } + } else { - string search = song.Title.ToUpper() + " " + song.Artist.ToUpper() + " " + song.FolderName.ToUpper() + " " + song.FileName.ToUpper(); + string search = song.Title.ToUpper() + " " + song.Artist.ToUpper(); if (searchStrings.All(search.Contains)) _FilteredSongs.Add(song); @@ -114,4 +273,4 @@ namespace Vocaluxe.Base _Changed = false; } } -} \ No newline at end of file +} From fcf212df1282f0f9fba6054333b47847eaf4e3a9 Mon Sep 17 00:00:00 2001 From: Stefan Date: Wed, 8 Jan 2020 22:06:20 +0100 Subject: [PATCH 06/84] Allow selection with more letters by key press While in a song list in Vocaluxe, you can press a letter key to select the first entry starting with this letter. I prefer to be able to press multiple letters, maybe ABB to get the first ABBA entry selected. I did the change on my end. --- Vocaluxe/Screens/CScreenSong.cs | 46 ++++++++++++++++----------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index 60031c4d..d3b4ef13 100644 --- a/Vocaluxe/Screens/CScreenSong.cs +++ b/Vocaluxe/Screens/CScreenSong.cs @@ -1,4 +1,4 @@ -#region license +#region license // This file is part of Vocaluxe. // // Vocaluxe is free software: you can redistribute it and/or modify @@ -77,6 +77,9 @@ namespace Vocaluxe.Screens private string _SearchText = String.Empty; private bool _SearchActive; + private int _JumpTo_lastCharTime = 0; + private String _JumpTo_lastSearchString = ""; + private readonly List _ButtonsJoker = new List(); private readonly List _TextsPlayer = new List(); private ESongOptionsView _CurSongOptionsView; @@ -1042,6 +1045,13 @@ namespace Vocaluxe.Screens private void _JumpTo(char letter) { + // Stefan1200: Add all letters from a key press within one second to a search string. Clear search string, if last key press is older than one second. + String searchString; + if (Environment.TickCount - _JumpTo_lastCharTime < 1000) + searchString = _JumpTo_lastSearchString + letter.ToString(); + else + searchString = letter.ToString(); + int start = 0; int curSelected = CSongs.IsInCategory ? _SongMenu.GetSelectedSongNr() : _SongMenu.GetSelectedCategory(); bool firstLevel = CConfig.Config.Game.Tabs == EOffOn.TR_CONFIG_OFF && CSongs.IsInCategory; @@ -1061,28 +1071,20 @@ namespace Vocaluxe.Screens { case ESongSorting.TR_CONFIG_ARTIST: case ESongSorting.TR_CONFIG_ARTIST_LETTER: - if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Artist.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) - start = curSelected + 1; - visibleID = _FindIndex(songs, start, element => element.Artist.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)); + visibleID = _FindIndex(songs, start, element => element.Artist.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); break; case ESongSorting.TR_CONFIG_YEAR: case ESongSorting.TR_CONFIG_DECADE: - if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Year.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) - start = curSelected + 1; - visibleID = _FindIndex(songs, start, element => element.Year.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)); + visibleID = _FindIndex(songs, start, element => element.Year.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); break; case ESongSorting.TR_CONFIG_TITLE_LETTER: - if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Title.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) - start = curSelected + 1; - visibleID = _FindIndex(songs, start, element => element.Title.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)); + visibleID = _FindIndex(songs, start, element => element.Title.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); break; case ESongSorting.TR_CONFIG_FOLDER: - if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Folder.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) - start = curSelected + 1; - visibleID = _FindIndex(songs, start, element => element.Folder.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)); + visibleID = _FindIndex(songs, start, element => element.Folder.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); break; } if (visibleID > -1) @@ -1097,16 +1099,12 @@ namespace Vocaluxe.Screens { case ESongSorting.TR_CONFIG_FOLDER: case ESongSorting.TR_CONFIG_TITLE_LETTER: - if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Artist.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) - start = curSelected + 1; - visibleID = _FindIndex(songs, start, element => element.Artist.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)); + visibleID = _FindIndex(songs, start, element => element.Artist.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); break; case ESongSorting.TR_CONFIG_ARTIST: case ESongSorting.TR_CONFIG_ARTIST_LETTER: - if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Title.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) - start = curSelected + 1; - visibleID = _FindIndex(songs, start, element => element.Title.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)); + visibleID = _FindIndex(songs, start, element => element.Title.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); break; } if (visibleID > -1) @@ -1116,12 +1114,14 @@ namespace Vocaluxe.Screens { ReadOnlyCollection categories = CSongs.Categories; int ct = categories.Count; - if (curSelected >= 0 && curSelected < ct - 1 && categories[curSelected].Name.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) - start = curSelected + 1; - int visibleID = _FindIndex(categories, start, element => element.Name.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)); + int visibleID = _FindIndex(categories, start, element => element.Name.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); if (visibleID > -1) _SongMenu.SetSelectedCategory(visibleID); } + + // Stefan1200: Remember search string and current TickCount in class variables. + _JumpTo_lastCharTime = Environment.TickCount; + _JumpTo_lastSearchString = searchString; } private void _ApplyNewSearchFilter(string newFilterString) @@ -1395,4 +1395,4 @@ namespace Vocaluxe.Screens } #endregion Playlist Actions } -} \ No newline at end of file +} From 4ee7a6fe2b3cb5a37fa280d2cd3ddbde78de236b Mon Sep 17 00:00:00 2001 From: Stefan Date: Fri, 10 Jan 2020 23:02:32 +0100 Subject: [PATCH 07/84] Add small text line with key shortcuts to Song Screen Add a small text line with key shortcuts to Song Screen, toggled if the search bar is active with help to the extended search keywords added by another commit. --- Vocaluxe/Screens/CScreenSong.cs | 56 +++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index 60031c4d..184e0dd8 100644 --- a/Vocaluxe/Screens/CScreenSong.cs +++ b/Vocaluxe/Screens/CScreenSong.cs @@ -1,4 +1,4 @@ -#region license +#region license // This file is part of Vocaluxe. // // Vocaluxe is free software: you can redistribute it and/or modify @@ -42,13 +42,15 @@ 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 6; } + get { return 7; } } private const string _TextCategory = "TextCategory"; private const string _TextSelection = "TextSelection"; private const string _TextSearchBarTitle = "TextSearchBarTitle"; private const string _TextSearchBar = "TextSearchBar"; + private const string _TextHelpBar = "TextHelpBar"; + private const string _TextHelpBarSearch = "TextHelpBarSearch"; private const string _TextOptionsTitle = "TextOptionsTitle"; private const string _ButtonOpenOptions = "ButtonOpenOptions"; @@ -77,6 +79,9 @@ namespace Vocaluxe.Screens private string _SearchText = String.Empty; private bool _SearchActive; + private int _JumpTo_lastCharTime = 0; + private String _JumpTo_lastSearchString = ""; + private readonly List _ButtonsJoker = new List(); private readonly List _TextsPlayer = new List(); private ESongOptionsView _CurSongOptionsView; @@ -134,6 +139,8 @@ namespace Vocaluxe.Screens tlist.Add(_TextSelection); tlist.Add(_TextSearchBarTitle); tlist.Add(_TextSearchBar); + tlist.Add(_TextHelpBar); + tlist.Add(_TextHelpBarSearch); tlist.Add(_TextOptionsTitle); _ThemeStatics = new string[] {_StaticSearchBar, _StaticOptionsBG}; @@ -727,12 +734,16 @@ namespace Vocaluxe.Screens _Texts[_TextSearchBar].Visible = true; _Texts[_TextSearchBarTitle].Visible = true; + _Texts[_TextHelpBar].Visible = false; + _Texts[_TextHelpBarSearch].Visible = true; _Statics[_StaticSearchBar].Visible = true; } else { _Texts[_TextSearchBar].Visible = false; _Texts[_TextSearchBarTitle].Visible = false; + _Texts[_TextHelpBar].Visible = true; + _Texts[_TextHelpBarSearch].Visible = false; _Statics[_StaticSearchBar].Visible = false; } @@ -1042,6 +1053,13 @@ namespace Vocaluxe.Screens private void _JumpTo(char letter) { + // Stefan1200: Add all letters from a key press within one second to a search string. Clear search string, if last key press is older than one second. + String searchString; + if (Environment.TickCount - _JumpTo_lastCharTime < 1000) + searchString = _JumpTo_lastSearchString + letter.ToString(); + else + searchString = letter.ToString(); + int start = 0; int curSelected = CSongs.IsInCategory ? _SongMenu.GetSelectedSongNr() : _SongMenu.GetSelectedCategory(); bool firstLevel = CConfig.Config.Game.Tabs == EOffOn.TR_CONFIG_OFF && CSongs.IsInCategory; @@ -1061,28 +1079,20 @@ namespace Vocaluxe.Screens { case ESongSorting.TR_CONFIG_ARTIST: case ESongSorting.TR_CONFIG_ARTIST_LETTER: - if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Artist.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) - start = curSelected + 1; - visibleID = _FindIndex(songs, start, element => element.Artist.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)); + visibleID = _FindIndex(songs, start, element => element.Artist.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); break; case ESongSorting.TR_CONFIG_YEAR: case ESongSorting.TR_CONFIG_DECADE: - if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Year.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) - start = curSelected + 1; - visibleID = _FindIndex(songs, start, element => element.Year.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)); + visibleID = _FindIndex(songs, start, element => element.Year.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); break; case ESongSorting.TR_CONFIG_TITLE_LETTER: - if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Title.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) - start = curSelected + 1; - visibleID = _FindIndex(songs, start, element => element.Title.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)); + visibleID = _FindIndex(songs, start, element => element.Title.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); break; case ESongSorting.TR_CONFIG_FOLDER: - if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Folder.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) - start = curSelected + 1; - visibleID = _FindIndex(songs, start, element => element.Folder.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)); + visibleID = _FindIndex(songs, start, element => element.Folder.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); break; } if (visibleID > -1) @@ -1097,16 +1107,12 @@ namespace Vocaluxe.Screens { case ESongSorting.TR_CONFIG_FOLDER: case ESongSorting.TR_CONFIG_TITLE_LETTER: - if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Artist.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) - start = curSelected + 1; - visibleID = _FindIndex(songs, start, element => element.Artist.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)); + visibleID = _FindIndex(songs, start, element => element.Artist.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); break; case ESongSorting.TR_CONFIG_ARTIST: case ESongSorting.TR_CONFIG_ARTIST_LETTER: - if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Title.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) - start = curSelected + 1; - visibleID = _FindIndex(songs, start, element => element.Title.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)); + visibleID = _FindIndex(songs, start, element => element.Title.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); break; } if (visibleID > -1) @@ -1116,12 +1122,14 @@ namespace Vocaluxe.Screens { ReadOnlyCollection categories = CSongs.Categories; int ct = categories.Count; - if (curSelected >= 0 && curSelected < ct - 1 && categories[curSelected].Name.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) - start = curSelected + 1; - int visibleID = _FindIndex(categories, start, element => element.Name.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)); + int visibleID = _FindIndex(categories, start, element => element.Name.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); if (visibleID > -1) _SongMenu.SetSelectedCategory(visibleID); } + + // Stefan1200: Remember search string and current TickCount in class variables. + _JumpTo_lastCharTime = Environment.TickCount; + _JumpTo_lastSearchString = searchString; } private void _ApplyNewSearchFilter(string newFilterString) @@ -1395,4 +1403,4 @@ namespace Vocaluxe.Screens } #endregion Playlist Actions } -} \ No newline at end of file +} From c536cc8ee35413f336c2d7b310170d10f5a47bdd Mon Sep 17 00:00:00 2001 From: Stefan Date: Fri, 10 Jan 2020 23:07:16 +0100 Subject: [PATCH 08/84] Add small text line with key shortcuts to Song Screen Add a small text line with key shortcuts to Song Screen, toggled if the search bar is active with help to the extended search keywords added by another commit. --- Vocaluxe/Screens/CScreenSong.cs | 44 ++++++++++++++++----------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index 184e0dd8..7b69b0c2 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 6; } } private const string _TextCategory = "TextCategory"; @@ -79,9 +79,6 @@ namespace Vocaluxe.Screens private string _SearchText = String.Empty; private bool _SearchActive; - private int _JumpTo_lastCharTime = 0; - private String _JumpTo_lastSearchString = ""; - private readonly List _ButtonsJoker = new List(); private readonly List _TextsPlayer = new List(); private ESongOptionsView _CurSongOptionsView; @@ -1053,13 +1050,6 @@ namespace Vocaluxe.Screens private void _JumpTo(char letter) { - // Stefan1200: Add all letters from a key press within one second to a search string. Clear search string, if last key press is older than one second. - String searchString; - if (Environment.TickCount - _JumpTo_lastCharTime < 1000) - searchString = _JumpTo_lastSearchString + letter.ToString(); - else - searchString = letter.ToString(); - int start = 0; int curSelected = CSongs.IsInCategory ? _SongMenu.GetSelectedSongNr() : _SongMenu.GetSelectedCategory(); bool firstLevel = CConfig.Config.Game.Tabs == EOffOn.TR_CONFIG_OFF && CSongs.IsInCategory; @@ -1079,20 +1069,28 @@ 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)); + if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Artist.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) + start = curSelected + 1; + visibleID = _FindIndex(songs, start, element => element.Artist.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)); break; case ESongSorting.TR_CONFIG_YEAR: case ESongSorting.TR_CONFIG_DECADE: - visibleID = _FindIndex(songs, start, element => element.Year.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); + if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Year.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) + start = curSelected + 1; + visibleID = _FindIndex(songs, start, element => element.Year.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)); break; case ESongSorting.TR_CONFIG_TITLE_LETTER: - visibleID = _FindIndex(songs, start, element => element.Title.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); + if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Title.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) + start = curSelected + 1; + visibleID = _FindIndex(songs, start, element => element.Title.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)); break; case ESongSorting.TR_CONFIG_FOLDER: - visibleID = _FindIndex(songs, start, element => element.Folder.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); + if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Folder.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) + start = curSelected + 1; + visibleID = _FindIndex(songs, start, element => element.Folder.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)); break; } if (visibleID > -1) @@ -1107,12 +1105,16 @@ 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)); + if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Artist.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) + start = curSelected + 1; + visibleID = _FindIndex(songs, start, element => element.Artist.StartsWith(letter.ToString(), 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)); + if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Title.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) + start = curSelected + 1; + visibleID = _FindIndex(songs, start, element => element.Title.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)); break; } if (visibleID > -1) @@ -1122,14 +1124,12 @@ namespace Vocaluxe.Screens { ReadOnlyCollection categories = CSongs.Categories; int ct = categories.Count; - int visibleID = _FindIndex(categories, start, element => element.Name.StartsWith(searchString, StringComparison.OrdinalIgnoreCase)); + if (curSelected >= 0 && curSelected < ct - 1 && categories[curSelected].Name.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) + start = curSelected + 1; + int visibleID = _FindIndex(categories, start, element => element.Name.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)); if (visibleID > -1) _SongMenu.SetSelectedCategory(visibleID); } - - // Stefan1200: Remember search string and current TickCount in class variables. - _JumpTo_lastCharTime = Environment.TickCount; - _JumpTo_lastSearchString = searchString; } private void _ApplyNewSearchFilter(string newFilterString) From d82dc7abc8020c7db00b17c3d77945e48ba83c22 Mon Sep 17 00:00:00 2001 From: Stefan Date: Fri, 10 Jan 2020 23:09:05 +0100 Subject: [PATCH 09/84] Add small text line with key shortcuts to Song Screen Add a small text line with key shortcuts to Song Screen, toggled if the search bar is active with help to the extended search keywords added by another commit. --- 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 7b69b0c2..cfb92605 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 6; } + get { return 7; } } private const string _TextCategory = "TextCategory"; From 039171d2a24951e9538f9626bad28b730001bd6b Mon Sep 17 00:00:00 2001 From: Stefan Date: Fri, 10 Jan 2020 23:11:43 +0100 Subject: [PATCH 10/84] English text line with key shortcuts to Song Screen Add a small text line with key shortcuts to Song Screen, toggled if the search bar is active with help to the extended search keywords added by another commit. --- Output/Languages/English.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Output/Languages/English.xml b/Output/Languages/English.xml index 63a4bad3..fcdfb63c 100644 --- a/Output/Languages/English.xml +++ b/Output/Languages/English.xml @@ -152,6 +152,8 @@ (%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, 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 Pause Stop singing Continue From 53d13ec7c81366a9071fa6dcf3a14856cb6f669f Mon Sep 17 00:00:00 2001 From: Stefan Date: Fri, 10 Jan 2020 23:12:24 +0100 Subject: [PATCH 11/84] German text line with key shortcuts to Song Screen Add a small text line with key shortcuts to Song Screen, toggled if the search bar is active with help to the extended search keywords added by another commit. --- Output/Languages/German.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Output/Languages/German.xml b/Output/Languages/German.xml index 1de7ea61..4aa84269 100644 --- a/Output/Languages/German.xml +++ b/Output/Languages/German.xml @@ -147,6 +147,8 @@ (%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, 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 Pause Lied beenden Fortfahren From 4aaef8ef578be991436bcb0e150142507ec7bf19 Mon Sep 17 00:00:00 2001 From: Stefan Date: Fri, 10 Jan 2020 23:13:17 +0100 Subject: [PATCH 12/84] Add small text line with key shortcuts to Song Screen Add a small text line with key shortcuts to Song Screen, toggled if the search bar is active with help to the extended search keywords added by another commit. --- Output/Themes/Genius/Screens/ScreenSong.xml | 30 ++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/Output/Themes/Genius/Screens/ScreenSong.xml b/Output/Themes/Genius/Screens/ScreenSong.xml index 1b74ad72..4d162ef8 100644 --- a/Output/Themes/Genius/Screens/ScreenSong.xml +++ b/Output/Themes/Genius/Screens/ScreenSong.xml @@ -2,7 +2,7 @@ ScreenSong - 6 + 7 @@ -238,6 +238,34 @@ Outline TR_SCREENSONG_SONGOPTIONS + + 40 + 700 + 0 + 16 + 1200 + + + Left + Bottom + + Outline + TR_SCREENSONG_HELPMESSAGE + + + 40 + 700 + 0 + 16 + 1200 + + + Left + Bottom + + Outline + TR_SCREENSONG_HELPMESSAGESEARCH + + From 15afc5e07bc9538e281fd305d3d4eb1af53d99e5 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 25 Jan 2020 09:11:33 +0100 Subject: [PATCH 67/84] 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 68/84] 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 69/84] 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 70/84] 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 71/84] 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 72/84] 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 73/84] 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 74/84] 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 75/84] 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 76/84] 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 77/84] 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 78/84] 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 79/84] 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 80/84] 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 81/84] 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 82/84] 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 83/84] 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 84/84] 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.