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 001/141] 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 eb2e9b8c5ca691a00634675f724272526272e0c1 Mon Sep 17 00:00:00 2001 From: Jiiniasu Date: Sun, 15 Jul 2018 00:04:21 +0200 Subject: [PATCH 002/141] Fix: Proper Scaling Function scaled 2 * scale instead of scale. --- VocaluxeLib/Extensions.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/VocaluxeLib/Extensions.cs b/VocaluxeLib/Extensions.cs index 5e36958d..ab91177c 100644 --- a/VocaluxeLib/Extensions.cs +++ b/VocaluxeLib/Extensions.cs @@ -171,10 +171,10 @@ namespace VocaluxeLib public static SRectF Scale(this SRectF rect, float scale) { return new SRectF( - rect.X - rect.W * (scale - 1f), - rect.Y - rect.H * (scale - 1f), - rect.W + 2 * rect.W * (scale - 1f), - rect.H + 2 * rect.H * (scale - 1f), + rect.X - rect.W * (scale - 1f) * 0.5f, + rect.Y - rect.H * (scale - 1f) * 0.5f, + rect.W * scale, + rect.H * scale, rect.Z); } From 4b67978df6c71aa82d113c4b824f7f526692fd26 Mon Sep 17 00:00:00 2001 From: Gary Kertopermono Date: Tue, 9 Apr 2019 23:23:02 +0200 Subject: [PATCH 003/141] 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 004/141] 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 005/141] 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 006/141] 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 007/141] 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 008/141] 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 009/141] 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 010/141] 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 011/141] 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 012/141] 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 013/141] 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 014/141] 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 071/141] 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 072/141] 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 073/141] 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 074/141] 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 075/141] 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 076/141] 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 077/141] 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 078/141] 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 079/141] 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 080/141] 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 081/141] 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 082/141] 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 083/141] 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 084/141] 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 085/141] 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 086/141] 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 087/141] 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 088/141] 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 089/141] 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 090/141] 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 091/141] 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 092/141] 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 093/141] 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 094/141] 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 095/141] 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 096/141] 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 097/141] 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 098/141] 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 099/141] 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 100/141] 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 101/141] 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 102/141] 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)); - } } } From 74ebbe1f1fdf2e00a4ae54ae8d9a7886565bc538 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 4 Feb 2020 08:24:10 +0100 Subject: [PATCH 103/141] Read R (RAP) and G (Golden RAP) notes as Freestyle notes Read R (RAP) and G (Golden RAP) notes as Freestyle notes currently. Final implementation needed! As mentioned in #479 this fix the song loading of songs, which contains R or G notes. But Vocaluxe still don't support these kind of notes, so the final implementation is needed. If someone wants to work on it, feel free. --- VocaluxeLib/Songs/CSongLoader.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/VocaluxeLib/Songs/CSongLoader.cs b/VocaluxeLib/Songs/CSongLoader.cs index ca642b4c..762e9d3c 100644 --- a/VocaluxeLib/Songs/CSongLoader.cs +++ b/VocaluxeLib/Songs/CSongLoader.cs @@ -571,6 +571,8 @@ namespace VocaluxeLib.Songs case ':': case '*': case 'F': + case 'R': // Read R (RAP) and G (Golden RAP) notes as Freestyle notes currently. Final implementation needed! + case 'G': // Read R (RAP) and G (Golden RAP) notes as Freestyle notes currently. Final implementation needed! string[] noteData = line.Split(splitChars, 4); if (noteData.Length < 4) { @@ -618,7 +620,7 @@ namespace VocaluxeLib.Songs if (tag.Equals('*')) noteType = ENoteType.Golden; - else if (tag.Equals('F')) + else if (tag.Equals('F') || tag.Equals('R') || tag.Equals('G')) // Read R (RAP) and G (Golden RAP) notes as Freestyle notes currently. Final implementation needed! noteType = ENoteType.Freestyle; else noteType = ENoteType.Normal; From 752b8e91feb95958f312bfbfbfa147de3db75afe Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 4 Feb 2020 12:15:28 +0100 Subject: [PATCH 104/141] Add list button to toggle playlist filter (#218) --- VocaluxeLib/Menu/CPlaylist.cs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/VocaluxeLib/Menu/CPlaylist.cs b/VocaluxeLib/Menu/CPlaylist.cs index 45517bf2..bd613e7b 100644 --- a/VocaluxeLib/Menu/CPlaylist.cs +++ b/VocaluxeLib/Menu/CPlaylist.cs @@ -81,6 +81,7 @@ namespace VocaluxeLib.Menu public SThemeButton ButtonPlaylistSave; public SThemeButton ButtonPlaylistDelete; public SThemeButton ButtonPlaylistSing; + public SThemeButton ButtonPlaylistList; public SThemeSelectSlide SelectSlideGameMode; } @@ -163,6 +164,7 @@ namespace VocaluxeLib.Menu private readonly CButton _ButtonPlaylistSave; private readonly CButton _ButtonPlaylistDelete; private readonly CButton _ButtonPlaylistSing; + private readonly CButton _ButtonPlaylistList; private readonly CText _Text1; private readonly CSelectSlide _SelectSlideGameMode; private readonly CStatic _StaticPlaylistHeader; @@ -235,6 +237,7 @@ namespace VocaluxeLib.Menu _ButtonPlaylistDelete = new CButton(_PartyModeID); _ButtonPlaylistSave = new CButton(_PartyModeID); _ButtonPlaylistSing = new CButton(_PartyModeID); + _ButtonPlaylistList = new CButton(_PartyModeID); _SelectSlideGameMode = new CSelectSlide(_PartyModeID); Visible = false; @@ -254,6 +257,7 @@ namespace VocaluxeLib.Menu _ButtonPlaylistDelete = new CButton(_Theme.ButtonPlaylistDelete, _PartyModeID); _ButtonPlaylistSave = new CButton(_Theme.ButtonPlaylistSave, _PartyModeID); _ButtonPlaylistSing = new CButton(_Theme.ButtonPlaylistSing, _PartyModeID); + _ButtonPlaylistList = new CButton(_Theme.ButtonPlaylistList, _PartyModeID); _SelectSlideGameMode = new CSelectSlide(_Theme.SelectSlideGameMode, _PartyModeID); _AddStatic(_StaticPlaylistFooter); @@ -263,6 +267,7 @@ namespace VocaluxeLib.Menu _AddButton(_ButtonPlaylistDelete); _AddButton(_ButtonPlaylistSave); _AddButton(_ButtonPlaylistSing); + _AddButton(_ButtonPlaylistList); Visible = false; Selected = false; @@ -279,6 +284,7 @@ namespace VocaluxeLib.Menu _Theme.ButtonPlaylistClose = (SThemeButton)_ButtonPlaylistClose.GetTheme(); _Theme.ButtonPlaylistSave = (SThemeButton)_ButtonPlaylistSave.GetTheme(); _Theme.ButtonPlaylistDelete = (SThemeButton)_ButtonPlaylistDelete.GetTheme(); + _Theme.ButtonPlaylistList = (SThemeButton)_ButtonPlaylistList.GetTheme(); } public void UpdateGame() @@ -321,6 +327,7 @@ namespace VocaluxeLib.Menu _ButtonPlaylistName.UnloadSkin(); _ButtonPlaylistSave.UnloadSkin(); _ButtonPlaylistSing.UnloadSkin(); + _ButtonPlaylistList.UnloadSkin(); _StaticPlaylistFooter.UnloadSkin(); _StaticPlaylistHeader.UnloadSkin(); @@ -342,6 +349,7 @@ namespace VocaluxeLib.Menu _ButtonPlaylistName.LoadSkin(); _ButtonPlaylistSave.LoadSkin(); _ButtonPlaylistSing.LoadSkin(); + _ButtonPlaylistList.LoadSkin(); _StaticPlaylistFooter.LoadSkin(); _StaticPlaylistHeader.LoadSkin(); @@ -640,6 +648,8 @@ namespace VocaluxeLib.Menu _StartPlaylistSongs(); else if (_ButtonPlaylistSave.Selected) CBase.Playlist.Save(ActivePlaylistID); + else if (isButtonPlaylistListSelected()) + return false; // Currently CScreenSong do this event! else if (_ButtonPlaylistDelete.Selected) { CBase.Playlist.Delete(ActivePlaylistID); @@ -672,6 +682,11 @@ namespace VocaluxeLib.Menu return true; } + public bool isButtonPlaylistListSelected() + { + return _ButtonPlaylistList.Selected; + } + private void _SetSelectionToLastEntry() { if (_PlaylistElementContents.Count == 0) @@ -781,6 +796,8 @@ namespace VocaluxeLib.Menu //LB actions if (mouseEvent.LB) { + if (isButtonPlaylistListSelected()) + return false; // Currently CScreenSong do this event! if (_CurrentPlaylistElement != -1) { CBase.Playlist.GetSong(ActivePlaylistID, _CurrentPlaylistElement + _Offset).GameMode = @@ -1171,6 +1188,15 @@ namespace VocaluxeLib.Menu _CompleteRect.W = _ButtonPlaylistDelete.Rect.W + _ButtonPlaylistDelete.Rect.X - _CompleteRect.X; if (_ButtonPlaylistDelete.Rect.Y + _ButtonPlaylistDelete.Rect.H > _CompleteRect.Y + _CompleteRect.H) _CompleteRect.H = _ButtonPlaylistDelete.Rect.H + _ButtonPlaylistDelete.Rect.Y - _CompleteRect.Y; + //ButtonPlaylistList + if (_ButtonPlaylistList.Rect.X < _CompleteRect.X) + _CompleteRect.X = _ButtonPlaylistList.Rect.X; + if (_ButtonPlaylistList.Rect.Y < _CompleteRect.Y) + _CompleteRect.Y = _ButtonPlaylistList.Rect.Y; + if (_ButtonPlaylistList.Rect.W + _ButtonPlaylistList.Rect.X > _CompleteRect.W + _CompleteRect.X) + _CompleteRect.W = _ButtonPlaylistList.Rect.W + _ButtonPlaylistList.Rect.X - _CompleteRect.X; + if (_ButtonPlaylistList.Rect.Y + _ButtonPlaylistList.Rect.H > _CompleteRect.Y + _CompleteRect.H) + _CompleteRect.H = _ButtonPlaylistList.Rect.H + _ButtonPlaylistList.Rect.Y - _CompleteRect.Y; } #region ThemeEdit From 8824eb3f25eff495cf8b3b057bad4244a0ed2a05 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 4 Feb 2020 12:16:47 +0100 Subject: [PATCH 105/141] Button image -> Toggle playlist filter --- Output/Themes/Genius/ListIcon.png | Bin 0 -> 720 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Output/Themes/Genius/ListIcon.png diff --git a/Output/Themes/Genius/ListIcon.png b/Output/Themes/Genius/ListIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..33bd9d4753f577a6470acded208bef93a779bcbb GIT binary patch literal 720 zcmeAS@N?(olHy`uVBq!ia0vp^CqS5k4M?tyST_$yF%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}2EbxddW?XfSbx09w{PTUVRBRuKqKn@sn^C{|I2mm<@EA9`W!5c z4gy3IEr-)D9sivFxMI({2X`xuzx(|({LGTWDol+E0vyB=-)DBE?>yBQ5?c z=6(Egd!bES`G>qc$>0Be(zd(BFqwm;$w7fwLdI?~-{zT~?Ve~sf`@xhD#P!*REC8n zNzTn)u+zr)r9mh0P6K+u_T`*;wl52Uhz&@vIx<5OdzAmlj+_^8+$;02|KF9sRLJ1z L>gTe~DWM4f;o-Yb literal 0 HcmV?d00001 From 8ad4f060151bcc013ca16cfbd073a6b2f04746a6 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 4 Feb 2020 12:17:38 +0100 Subject: [PATCH 106/141] Add playlist filter toggle image --- Output/Themes/Genius/01_Standard.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/Output/Themes/Genius/01_Standard.xml b/Output/Themes/Genius/01_Standard.xml index 8147bbdf..f3174336 100644 --- a/Output/Themes/Genius/01_Standard.xml +++ b/Output/Themes/Genius/01_Standard.xml @@ -353,6 +353,7 @@ DeleteIcon.png SaveIcon.png SingIcon.png + ListIcon.png MinusIcon.png PlusIcon.png VolUp.png From 57c78d47b4d5ed5e056db373318708632590e805 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 4 Feb 2020 12:17:59 +0100 Subject: [PATCH 107/141] Add playlist filter toggle image --- Output/Themes/Genius/02_Ice_Blue.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/Output/Themes/Genius/02_Ice_Blue.xml b/Output/Themes/Genius/02_Ice_Blue.xml index 0e9d9806..9d27bd3b 100644 --- a/Output/Themes/Genius/02_Ice_Blue.xml +++ b/Output/Themes/Genius/02_Ice_Blue.xml @@ -353,6 +353,7 @@ DeleteIcon.png SaveIcon.png SingIcon.png + ListIcon.png MinusIcon.png PlusIcon.png VolUp.png From 0672f4aff63d630562c8bb2fd4f65e6c68288036 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 4 Feb 2020 12:18:26 +0100 Subject: [PATCH 108/141] Add playlist filter toggle image --- Output/Themes/Genius/03_Crimson_Red.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/Output/Themes/Genius/03_Crimson_Red.xml b/Output/Themes/Genius/03_Crimson_Red.xml index aa3f4cfb..c29f5e8e 100644 --- a/Output/Themes/Genius/03_Crimson_Red.xml +++ b/Output/Themes/Genius/03_Crimson_Red.xml @@ -353,6 +353,7 @@ DeleteIcon.png SaveIcon.png SingIcon.png + ListIcon.png MinusIcon.png PlusIcon.png VolUp.png From cc724c55b371c438fe50a7bcf99c6217c45ce090 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 4 Feb 2020 12:19:37 +0100 Subject: [PATCH 109/141] Add playlist filter toggle button image --- 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 4d69765a..e100713c 100644 --- a/Output/Themes/Genius/Screens/ScreenSong.xml +++ b/Output/Themes/Genius/Screens/ScreenSong.xml @@ -2,7 +2,7 @@ ScreenSong - 9 + 10 @@ -1460,6 +1460,33 @@ + + ListIcon + ListIcon + + 1120 + 548 + 35 + 35 + -1.01 + + + + + 180 + 5 + 0 + 25 + 350 + + + Center + Center + + Outline + + + DeleteIcon DeleteIcon From e209aee3e7d1cfe3f55d2250b43f3c2017dcc4b2 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 4 Feb 2020 12:20:17 +0100 Subject: [PATCH 110/141] Update Changelog_ScreenSong.txt --- Output/Themes/Changelog/Changelog_ScreenSong.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Output/Themes/Changelog/Changelog_ScreenSong.txt b/Output/Themes/Changelog/Changelog_ScreenSong.txt index 563bd3ab..7b5e00a2 100644 --- a/Output/Themes/Changelog/Changelog_ScreenSong.txt +++ b/Output/Themes/Changelog/Changelog_ScreenSong.txt @@ -1,5 +1,11 @@ ScreenSong +++++++++++ +Version 10: + +Add: + + ++++++++++ Version 9: From 56413904422458e877bf563f5a028c774d24f99b Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 4 Feb 2020 12:22:02 +0100 Subject: [PATCH 111/141] Add event handling for new playlist filter toggle button --- Vocaluxe/Screens/CScreenSong.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index 3f851153..33130398 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 9; } + get { return 10; } } private const string _TextCategory = "TextCategory"; @@ -217,6 +217,11 @@ namespace Vocaluxe.Screens keyEvent.Handled = true; return true; } + if (keyEvent.Key == Keys.Enter && _Playlist.isButtonPlaylistListSelected()) + { + _TogglePlaylistFilter(); + return true; + } } // Playlist selection is handled below not in base! @@ -506,6 +511,11 @@ namespace Vocaluxe.Screens _SongMenu.SmallView = false; return true; } + if (mouseEvent.LB && _Playlist.isButtonPlaylistListSelected()) + { + _TogglePlaylistFilter(); + return true; + } } else if (CHelper.IsInBounds(_SongMenu.Rect, mouseEvent)) { From 45582f8a540219ae9333050a16f6531c2118ad57 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 4 Feb 2020 13:57:25 +0100 Subject: [PATCH 112/141] Fix X position calculation of cover and text --- VocaluxeLib/Menu/SongMenu/CSongMenuList.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs b/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs index 8f023cf4..4d9f1746 100644 --- a/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs +++ b/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs @@ -176,12 +176,12 @@ namespace VocaluxeLib.Menu.SongMenu for (int i = 0; i < _ListLength; i++) { //Create Cover - var rect = new SRectF(Rect.X + (_TileW + _SpaceW), Rect.Y + i * (_TileH + _SpaceH), _TileW, _TileH, Rect.Z); + var rect = new SRectF(Rect.X, Rect.Y + i * (_TileH + _SpaceH), _TileW, _TileH, Rect.Z); var tile = new CStatic(_PartyModeID, _CoverBGTexture, _Color, rect); _Tiles.Add(tile); //Create text - var textRect = new SRectF(MaxRect.X + 2 * (_TileW + _SpaceW), Rect.Y + i * (_TileH + _SpaceH), _ListTextWidth, _TileH, Rect.Z); + var textRect = new SRectF(MaxRect.X + (_TileW + _SpaceW), Rect.Y + i * (_TileH + _SpaceH), _ListTextWidth, _TileH, Rect.Z); CText text = new CText(textRect.X, textRect.Y, textRect.Z, textRect.H, textRect.W, EAlignment.Left, EStyle.Normal, "Normal", _Artist.Color, ""); From 9f3af316fabd0dbe55793b44f94c4f2cca8dff3c Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 4 Feb 2020 14:04:42 +0100 Subject: [PATCH 113/141] Fixed wrong X and W values at SongMenuList --- Output/Themes/Genius/Screens/ScreenSong.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Output/Themes/Genius/Screens/ScreenSong.xml b/Output/Themes/Genius/Screens/ScreenSong.xml index 4d69765a..51fe0740 100644 --- a/Output/Themes/Genius/Screens/ScreenSong.xml +++ b/Output/Themes/Genius/Screens/ScreenSong.xml @@ -1004,16 +1004,16 @@ 10 10 - 375 + 410 42 - 850 + 830 555 -1 - 375 + 410 42 - 450 + 410 550 -1 From 0efb027fdcde0c5152aee1ac473cfadf6b6c84db Mon Sep 17 00:00:00 2001 From: Stefan Date: Wed, 5 Feb 2020 15:17:38 +0100 Subject: [PATCH 114/141] Improved calculation of first line for song name text With issue pull request #455 I just implemented a simple calculation based on the song gap. But on some txt files the first line don't start at beat 0. Improved the calculation to the first beat of the first line from voice 0. --- Vocaluxe/Screens/CScreenSing.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index 5ab5f59d..9cfaea9a 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -1187,7 +1187,11 @@ namespace Vocaluxe.Screens _TimerDuetText1.Reset(); _TimerDuetText2.Reset(); - float realGap = song.Gap - song.Start; + // Getting the real start of the first line from the first voice, no other voices are on top since #454. + // Needed for displaying song name on duet game mode or lyric on top settings (implemented with #455). + CVoice voice = song.Notes.GetVoice(0); // As long as only voice 0 is on top (no matter if duet or other modes). + CSongLine[] lines = voice.Lines; + float realGap = CGame.GetTimeFromBeats(lines[0].FirstNoteBeat, song.BPM) + (song.Gap - song.Start); _TimeShowSongTextTotal = 10f; if (_Lyrics[_LyricMainDuet].Visible || _Lyrics[_LyricMainTop].Visible) { From 5ebca1be5d9cd69e9c4a258da05faba9f5e7f874 Mon Sep 17 00:00:00 2001 From: Stefan Date: Wed, 5 Feb 2020 19:15:09 +0100 Subject: [PATCH 115/141] Automatic Video Aspect now selects the best mode for widescreen It now uses LetterBox on 2.29:1 and similar aspect ratio movies (e.g. 640x280). --- 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 9cfaea9a..3e2a17eb 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -842,7 +842,7 @@ namespace Vocaluxe.Screens SRectF bounds = CSettings.RenderRect; if (_VideoAspect == EAspect.Automatic) - _VideoAspect = (background.OrigAspect <= 1.5 ? EAspect.LetterBox : EAspect.Crop); + _VideoAspect = ((background.OrigAspect <= 1.5 || background.OrigAspect >= 2.0) ? EAspect.LetterBox : EAspect.Crop); aspect = _VideoAspect; SRectF rect = CHelper.FitInBounds(bounds, background.OrigAspect, aspect); From 8d6f8ffca8e0110f7577f6967058bab7bae6fcab Mon Sep 17 00:00:00 2001 From: Stefan Date: Wed, 5 Feb 2020 22:51:01 +0100 Subject: [PATCH 116/141] Fix: Ignored VIDEOASPECT value from txt file Also changed letterbox detection at OrigAspect from >= 2.0 to >= 1.9. Unchanged for <= 1.5. --- Vocaluxe/Screens/CScreenSing.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index 3e2a17eb..2e9f892c 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -842,7 +842,7 @@ namespace Vocaluxe.Screens SRectF bounds = CSettings.RenderRect; if (_VideoAspect == EAspect.Automatic) - _VideoAspect = ((background.OrigAspect <= 1.5 || background.OrigAspect >= 2.0) ? EAspect.LetterBox : EAspect.Crop); + _VideoAspect = ((background.OrigAspect <= 1.5 || background.OrigAspect >= 1.9) ? EAspect.LetterBox : EAspect.Crop); aspect = _VideoAspect; SRectF rect = CHelper.FitInBounds(bounds, background.OrigAspect, aspect); @@ -1125,7 +1125,7 @@ namespace Vocaluxe.Screens voiceAssignments[i] = CGame.Players[i].VoiceNr; } - _VideoAspect = EAspect.Automatic; + _VideoAspect = song.VideoAspect; if (!String.IsNullOrEmpty(song.VideoFileName)) { _CurrentVideo = CVideo.Load(Path.Combine(song.Folder, song.VideoFileName)); From d4fd0c7ba136881743ded50fab32b318ded9fd77 Mon Sep 17 00:00:00 2001 From: Stefan Date: Fri, 7 Feb 2020 21:10:31 +0100 Subject: [PATCH 117/141] Scroll offset was ignored while singing a single playlist song (fix #487) --- VocaluxeLib/Menu/CPlaylist.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VocaluxeLib/Menu/CPlaylist.cs b/VocaluxeLib/Menu/CPlaylist.cs index bd613e7b..13388a46 100644 --- a/VocaluxeLib/Menu/CPlaylist.cs +++ b/VocaluxeLib/Menu/CPlaylist.cs @@ -500,7 +500,7 @@ namespace VocaluxeLib.Menu break; case Keys.Enter: - _StartPlaylistSong(_CurrentPlaylistElement); + _StartPlaylistSong(_CurrentPlaylistElement + _Offset); break; case Keys.Add: //move the selected song up @@ -835,7 +835,7 @@ namespace VocaluxeLib.Menu //Start selected song with double click if (mouseEvent.LD && _CurrentPlaylistElement != -1) - _StartPlaylistSong(_CurrentPlaylistElement); + _StartPlaylistSong(_CurrentPlaylistElement + _Offset); //Change order with holding LB if (mouseEvent.LBH && _CurrentPlaylistElement != -1 && _PlaylistElementContents.Count > 0 && DragAndDropSongID == -1) From fda174816d9794d490f5f7cae8791fbb803e8aaf Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 8 Feb 2020 10:25:35 +0100 Subject: [PATCH 118/141] Fix playlist name display and playlist selection (fix #490) --- VocaluxeLib/Menu/CMenuPartySongSelection.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/VocaluxeLib/Menu/CMenuPartySongSelection.cs b/VocaluxeLib/Menu/CMenuPartySongSelection.cs index 815d4ded..41ecd0b6 100644 --- a/VocaluxeLib/Menu/CMenuPartySongSelection.cs +++ b/VocaluxeLib/Menu/CMenuPartySongSelection.cs @@ -100,6 +100,8 @@ namespace VocaluxeLib.Menu protected int NumMinMedleySongs = 3; protected int NumMaxMedleySongs = 10; + private List _PlaylistIDs; + public override void Init() { base.Init(); @@ -188,6 +190,8 @@ namespace VocaluxeLib.Menu _SelectSlides[_SelectSlideSorting].AddValue(ss.ToString()); _SelectSlides[_SelectSlidePlaylist].Clear(); + _SelectSlides[_SelectSlidePlaylist].NumVisible = 1; // Make sure that only one playlist at a time will be displayed (or the names overlap) + _PlaylistIDs = CBase.Playlist.GetIds(); List playlists = CBase.Playlist.GetNames(); for (int i = 0; i < playlists.Count; i++) { @@ -220,7 +224,7 @@ namespace VocaluxeLib.Menu _SongMode = _SelectSlides[_SelectSlideSongMode].Selection; _Source = _SelectSlides[_SelectSlideSource].Selection; NumMedleySongs = NumMinMedleySongs + _SelectSlides[_SelectSlideNumMedleySongs].Selection; - Playlist = _SelectSlides[_SelectSlidePlaylist].Selection; + Playlist = _PlaylistIDs[_SelectSlides[_SelectSlidePlaylist].Selection]; if (_SelectSlides[_SelectSlideSorting].Selection != _Sorting) { From ce5dabc849a02dc4559cb7b43e66beb0132290c8 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 8 Feb 2020 10:27:49 +0100 Subject: [PATCH 119/141] Add possibility to get playlist ids --- VocaluxeLib/IBasic.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/VocaluxeLib/IBasic.cs b/VocaluxeLib/IBasic.cs index e182273b..ad09e6a2 100644 --- a/VocaluxeLib/IBasic.cs +++ b/VocaluxeLib/IBasic.cs @@ -304,6 +304,7 @@ namespace VocaluxeLib { bool Exists(int playlistID); string GetName(int playlistID); + List GetIds(); List GetNames(); void SetName(int playlistID, string name); @@ -336,4 +337,4 @@ namespace VocaluxeLib bool IsPlaying(); float GetLength(); } -} \ No newline at end of file +} From 61be47ace136bd0e05b1b87a4f9cbf33b8b0a8bf Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 8 Feb 2020 10:28:55 +0100 Subject: [PATCH 120/141] Add possibility to request playlist ids --- Vocaluxe/Base/CMain.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Vocaluxe/Base/CMain.cs b/Vocaluxe/Base/CMain.cs index 0689ccba..89824b8b 100644 --- a/Vocaluxe/Base/CMain.cs +++ b/Vocaluxe/Base/CMain.cs @@ -964,6 +964,11 @@ namespace Vocaluxe.Base CPlaylists.SetName(playlistID, name); } + public List GetIds() + { + return CPlaylists.Ids; + } + public List GetNames() { return CPlaylists.Names; @@ -1044,4 +1049,4 @@ namespace Vocaluxe.Base return CPlaylists.ContainsSong(playlistID, songID); } } -} \ No newline at end of file +} From 8c94df30939811b0a0b7edca10b44e7e26141ff1 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 8 Feb 2020 18:16:31 +0100 Subject: [PATCH 121/141] Fix System.ArgumentOutOfRangeException Fixes #492 --- VocaluxeLib/Menu/CMenuPartySongSelection.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/VocaluxeLib/Menu/CMenuPartySongSelection.cs b/VocaluxeLib/Menu/CMenuPartySongSelection.cs index 41ecd0b6..5b8c95c2 100644 --- a/VocaluxeLib/Menu/CMenuPartySongSelection.cs +++ b/VocaluxeLib/Menu/CMenuPartySongSelection.cs @@ -224,7 +224,10 @@ namespace VocaluxeLib.Menu _SongMode = _SelectSlides[_SelectSlideSongMode].Selection; _Source = _SelectSlides[_SelectSlideSource].Selection; NumMedleySongs = NumMinMedleySongs + _SelectSlides[_SelectSlideNumMedleySongs].Selection; - Playlist = _PlaylistIDs[_SelectSlides[_SelectSlidePlaylist].Selection]; + if (_SelectSlides[_SelectSlidePlaylist].Selection >= 0) + Playlist = _PlaylistIDs[_SelectSlides[_SelectSlidePlaylist].Selection]; + else + Playlist = -1; if (_SelectSlides[_SelectSlideSorting].Selection != _Sorting) { From 49e1b4b947567cc5b6bc708358a7a0372efe41e7 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 8 Feb 2020 18:22:22 +0100 Subject: [PATCH 122/141] Made playlist selection checking nicer --- VocaluxeLib/Menu/CMenuPartySongSelection.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/VocaluxeLib/Menu/CMenuPartySongSelection.cs b/VocaluxeLib/Menu/CMenuPartySongSelection.cs index 5b8c95c2..44e609e9 100644 --- a/VocaluxeLib/Menu/CMenuPartySongSelection.cs +++ b/VocaluxeLib/Menu/CMenuPartySongSelection.cs @@ -224,8 +224,10 @@ namespace VocaluxeLib.Menu _SongMode = _SelectSlides[_SelectSlideSongMode].Selection; _Source = _SelectSlides[_SelectSlideSource].Selection; NumMedleySongs = NumMinMedleySongs + _SelectSlides[_SelectSlideNumMedleySongs].Selection; - if (_SelectSlides[_SelectSlidePlaylist].Selection >= 0) - Playlist = _PlaylistIDs[_SelectSlides[_SelectSlidePlaylist].Selection]; + + int playlistSelection = _SelectSlides[_SelectSlidePlaylist].Selection; + if (playlistSelection >= 0 && playlistSelection < _PlaylistIDs.Count) + Playlist = _PlaylistIDs[playlistSelection]; else Playlist = -1; From 341323e84fcfb293c201e399b2d27254efe4a864 Mon Sep 17 00:00:00 2001 From: lukeIam <2lukeiam@gmail.com> Date: Sun, 9 Feb 2020 10:17:38 +0100 Subject: [PATCH 123/141] Mod: Change from myget to nuget.org --- NuGet.Config | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/NuGet.Config b/NuGet.Config index ec2f39ad..5d7aa0c7 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -2,12 +2,10 @@ - - + - \ No newline at end of file From c62ee015df3607d8fb10d34be83fc43689b9efcc Mon Sep 17 00:00:00 2001 From: lukeIam <2lukeiam@gmail.com> Date: Sun, 9 Feb 2020 10:18:39 +0100 Subject: [PATCH 124/141] Mod: use new ffmpeg nuget packages --- NuGet.Config | 4 ++-- Vocaluxe/Vocaluxe.csproj | 8 ++++---- Vocaluxe/packages.config | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/NuGet.Config b/NuGet.Config index 5d7aa0c7..b6c2fcad 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -1,10 +1,10 @@  - + - + diff --git a/Vocaluxe/Vocaluxe.csproj b/Vocaluxe/Vocaluxe.csproj index 08514033..6975931b 100644 --- a/Vocaluxe/Vocaluxe.csproj +++ b/Vocaluxe/Vocaluxe.csproj @@ -565,10 +565,10 @@ This project references NuGet package(s) that are missing on this computer. Rebuild for automatic package restore. The missing file is {0}. - + - + @@ -578,10 +578,10 @@ - + - + diff --git a/Vocaluxe/packages.config b/Vocaluxe/packages.config index 0dbfb55c..5f608d07 100644 --- a/Vocaluxe/packages.config +++ b/Vocaluxe/packages.config @@ -1,10 +1,10 @@  - + - + From 657a6cb67f4181d89b88b1b5c26155ff2c43eddc Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 9 Feb 2020 20:01:03 +0100 Subject: [PATCH 125/141] Fix alpha calculation for last sub line Sub line was displayed wrong, if the last lyric line has a bigger distance to the second last line. Alpha calculation for sub lines stopped one line to early and might be visible even if it shouldn't be. --- 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 2e9f892c..2278c78a 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -1459,7 +1459,7 @@ namespace Vocaluxe.Screens } // sub - if (currentLineSub < lines.Length - 2) + if ((currentLineSub + 1) < lines.Length) { float diff = CGame.GetTimeFromBeats(lines[currentLineSub + 1].FirstNoteBeat, song.BPM) - currentTime; From 673fc4b820b673e4507178ab37db0463b1aa4341 Mon Sep 17 00:00:00 2001 From: lukeIam <2lukeiam@gmail.com> Date: Mon, 10 Feb 2020 19:06:47 +0100 Subject: [PATCH 126/141] Fix: wrong nuget.org api url --- NuGet.Config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NuGet.Config b/NuGet.Config index b6c2fcad..de31da0b 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -1,10 +1,10 @@  - + - + From 96b16c1a7c309c0cd0b0f436b06b76fe98445ce5 Mon Sep 17 00:00:00 2001 From: JanK118 <60331177+JanK118@users.noreply.github.com> Date: Tue, 11 Feb 2020 01:10:17 +0100 Subject: [PATCH 127/141] Update README.md Deleted the link to the support forum, because it's no longer online... --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 36330d98..8c0b75a6 100644 --- a/README.md +++ b/README.md @@ -52,5 +52,4 @@ Vocaluxe Homepage: https://vocaluxe.org/ GitHub Wiki: https://github.com/Vocaluxe/Vocaluxe/wiki GitHub Issues Tracker: https://github.com/Vocaluxe/Vocaluxe/issues Translations: https://www.transifex.com/projects/p/vocaluxe/ -Support Forum (German): http://www.ultra-star.de Song-Database (USDB): http://usdb.animux.de/ From f408cafca81e6ba17f9ff11bea4b295d0f0b808f Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 11 Feb 2020 12:07:41 +0100 Subject: [PATCH 128/141] Info text for CTRL+S if Medley is not possible "No Medley for this song!" will be displayed at middle top screen border. --- Vocaluxe/Screens/CScreenSong.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index 33130398..49f09f16 100644 --- a/Vocaluxe/Screens/CScreenSong.cs +++ b/Vocaluxe/Screens/CScreenSong.cs @@ -963,7 +963,12 @@ namespace Vocaluxe.Screens _SongMenu.Update(_Sso); _SongMenu.OnShow(); - _Texts[_TextShortInfoTop].Text = CBase.Language.Translate("TR_SCREENSONG_SORTING").Replace("%s", CBase.Language.Translate(_Sso.Sorting.SongSorting.ToString())); + _ShowInfoText(CBase.Language.Translate("TR_SCREENSONG_SORTING").Replace("%s", CBase.Language.Translate(_Sso.Sorting.SongSorting.ToString()))); + } + + private void _ShowInfoText(String text) + { + _Texts[_TextShortInfoTop].Text = text; _Statics[_StaticShortInfoTop].Visible = true; _Texts[_TextShortInfoTop].Visible = true; _TimerShortInfoText.Stop(); @@ -1035,7 +1040,10 @@ namespace Vocaluxe.Screens if (CSongs.IsInCategory && (songNr >= 0)) { if (!CSongs.VisibleSongs[songNr].IsGameModeAvailable(EGameMode.TR_GAMEMODE_MEDLEY)) + { + _ShowInfoText(CBase.Language.Translate("TR_SCREENSONG_NOMEDLEY")); return; + } CGame.Reset(); CGame.ClearSongs(); From 8094967a453dd0cb8b8fba07a5140696cee5f290 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 11 Feb 2020 12:09:18 +0100 Subject: [PATCH 129/141] No Medley text added --- Output/Languages/English.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/Output/Languages/English.xml b/Output/Languages/English.xml index fc7a4ca2..434d4720 100644 --- a/Output/Languages/English.xml +++ b/Output/Languages/English.xml @@ -156,6 +156,7 @@ 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 + No Medley for this song! Pause Stop singing Continue From 824efc50711d8942a2bea97361aced92123d8ef8 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 11 Feb 2020 12:09:47 +0100 Subject: [PATCH 130/141] No Medley text added --- Output/Languages/German.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/Output/Languages/German.xml b/Output/Languages/German.xml index dc0fc2d1..c043222f 100644 --- a/Output/Languages/German.xml +++ b/Output/Languages/German.xml @@ -151,6 +151,7 @@ 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 + Kein Medley für diesen Song! Pause Lied beenden Fortfahren From c59f2c937ac7cda0a64b5be084f9a551f56599a5 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 18 Feb 2020 10:10:59 +0100 Subject: [PATCH 131/141] Adding PillarBox as own EAspect (fix #499) Prior this change PillarBox was made in a special case at LetterBox, but that has an effect on the cover image creation. Fix #499 --- VocaluxeLib/CHelper.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/VocaluxeLib/CHelper.cs b/VocaluxeLib/CHelper.cs index fa5fb2f4..35a6ae5c 100644 --- a/VocaluxeLib/CHelper.cs +++ b/VocaluxeLib/CHelper.cs @@ -139,12 +139,7 @@ namespace VocaluxeLib } break; case EAspect.LetterBox: - if (boundsAspectRatio == aspectRatio) // Pillarbox - { - scaledWidth = bounds.W * 0.77f; - scaledHeight = bounds.W / aspectRatio; - } - else if (boundsAspectRatio < aspectRatio) + if (boundsAspectRatio < aspectRatio) { scaledWidth = bounds.W; scaledHeight = bounds.W / aspectRatio; @@ -155,6 +150,10 @@ namespace VocaluxeLib scaledWidth = bounds.H * aspectRatio; } break; + case EAspect.PillarBox: + scaledWidth = bounds.W * 0.77f; + scaledHeight = bounds.W / aspectRatio; + break; default: return bounds; } From dc98e13da50a9abc2567609e901ce14c8b851dc8 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 18 Feb 2020 10:12:08 +0100 Subject: [PATCH 132/141] Added PillarBox EAspect --- VocaluxeLib/Enums.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/VocaluxeLib/Enums.cs b/VocaluxeLib/Enums.cs index 84252cfa..02cb86a7 100644 --- a/VocaluxeLib/Enums.cs +++ b/VocaluxeLib/Enums.cs @@ -67,6 +67,7 @@ namespace VocaluxeLib Automatic, Crop, LetterBox, + PillarBox, Stretch, Zoom1, Zoom2 From 43c1a70a4bcfd8b296c781666bfa3830f6c2b8bf Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 18 Feb 2020 18:24:53 +0100 Subject: [PATCH 133/141] New sing screen text --- Output/Languages/English.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Output/Languages/English.xml b/Output/Languages/English.xml index 434d4720..b315840e 100644 --- a/Output/Languages/English.xml +++ b/Output/Languages/English.xml @@ -163,6 +163,10 @@ Skip this song Restart round Restart game + No more songs in playlist! + No webcam available! + Aspect Ratio: %a + Skipped %s seconds Scores Rating Points From 1cc3b805c4899af3f2b59724585f29591fe1776d Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 18 Feb 2020 18:28:17 +0100 Subject: [PATCH 134/141] New sing screen text --- Output/Languages/German.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Output/Languages/German.xml b/Output/Languages/German.xml index c043222f..9076e3b8 100644 --- a/Output/Languages/German.xml +++ b/Output/Languages/German.xml @@ -156,6 +156,10 @@ Lied beenden Fortfahren Lied überspringen + Keine weiteren Songs in der Playlist! + Keine Webcam verfügbar! + Seitenverhältnis: %a + %s Sekunden gesprungen Auswertung Bewertung Punkte From d65736119f00c3b290c5c4ed81586bc47be55f5a Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 18 Feb 2020 18:29:50 +0100 Subject: [PATCH 135/141] Small info text on the top right corner --- Output/Themes/Genius/Screens/ScreenSing.xml | 27 ++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/Output/Themes/Genius/Screens/ScreenSing.xml b/Output/Themes/Genius/Screens/ScreenSing.xml index 36cebdac..44badc9c 100644 --- a/Output/Themes/Genius/Screens/ScreenSing.xml +++ b/Output/Themes/Genius/Screens/ScreenSing.xml @@ -2,7 +2,7 @@ ScreenSing - 9 + 10 @@ -627,8 +627,33 @@ -0.75 + + + + + 980 + 0 + 300 + 30 + -0.75 + + + + 1130 + 2 + -3 + 25 + 280 + + + Center + Center + + Outline + + 640 10 From 6507e4d26719cb069839cf289ca790e87fa53f2e Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 18 Feb 2020 18:35:31 +0100 Subject: [PATCH 136/141] New sing screen info text for some key shortcuts On sing screen the following key shortcuts displays an info text on the top right corner: v w (if no webcam available) CTRL + s (if no more songs are on playlist) CTRL + Right Arrow --- Vocaluxe/Screens/CScreenSing.cs | 40 +++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index 2278c78a..b39eb6cc 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -21,6 +21,7 @@ using System.Diagnostics; using System.Drawing; using System.IO; using System.Linq; +using System.Timers; using System.Windows.Forms; using Vocaluxe.Base; using Vocaluxe.Base.Fonts; @@ -40,7 +41,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 9; } + get { return 10; } } private struct STimeRect @@ -50,6 +51,7 @@ namespace Vocaluxe.Screens public float EndBeat; } + private const string _TextShortInfoTop = "TextShortInfoTop"; private const string _TextSongName = "TextSongName"; private const string _TextTime = "TextTime"; private const string _TextDuetName1 = "TextDuetName1"; @@ -59,6 +61,7 @@ namespace Vocaluxe.Screens private string[,,] _TextNames; private List _TextsPause; + private const string _StaticShortInfoTop = "StaticShortInfoTop"; private const string _StaticSongText = "StaticSongText"; private const string _StaticLyrics = "StaticLyrics"; private const string _StaticLyricsDuet = "StaticLyricsDuet"; @@ -135,6 +138,8 @@ namespace Vocaluxe.Screens private CBackground _SlideShow; private SScreenSongOptions _Sso; + + private System.Timers.Timer _TimerShortInfoText; public override EMusicType CurrentMusicType { @@ -145,12 +150,13 @@ namespace Vocaluxe.Screens { base.Init(); - var texts = new List { _TextSongName, _TextTime, _TextDuetName1, _TextDuetName2, _TextMedleyCountdown }; + var texts = new List { _TextShortInfoTop, _TextSongName, _TextTime, _TextDuetName1, _TextDuetName2, _TextMedleyCountdown }; _BuildTextStrings(texts); _ThemeTexts = texts.ToArray(); var statics = new List { + _StaticShortInfoTop, _StaticSongText, _StaticLyrics, _StaticLyricsDuet, @@ -184,6 +190,25 @@ namespace Vocaluxe.Screens _TimerSongText = new Stopwatch(); _TimerDuetText1 = new Stopwatch(); _TimerDuetText2 = new Stopwatch(); + + _TimerShortInfoText = new System.Timers.Timer(5000); + _TimerShortInfoText.AutoReset = false; + _TimerShortInfoText.Elapsed += OnTimedEventShortInfoText; + } + + private void OnTimedEventShortInfoText(Object source, ElapsedEventArgs e) + { + _Statics[_StaticShortInfoTop].Visible = false; + _Texts[_TextShortInfoTop].Visible = false; + } + + private void _ShowInfoText(String text) + { + _Texts[_TextShortInfoTop].Text = text; + _Statics[_StaticShortInfoTop].Visible = true; + _Texts[_TextShortInfoTop].Visible = true; + _TimerShortInfoText.Stop(); + _TimerShortInfoText.Enabled = true; } public override void LoadTheme(string xmlPath) @@ -248,6 +273,8 @@ namespace Vocaluxe.Screens if (keyEvent.ModCtrl) _NextSong(); } + else + _ShowInfoText(CBase.Language.Translate("TR_SCREENSING_NOMORESONGS")); break; case Keys.W: if (CWebcam.IsDeviceAvailable()) @@ -258,6 +285,8 @@ namespace Vocaluxe.Screens else CWebcam.Stop(); } + else + _ShowInfoText(CBase.Language.Translate("TR_SCREENSING_NOWEBCAM")); break; case Keys.Enter: if (_Pause) @@ -293,6 +322,8 @@ namespace Vocaluxe.Screens CSong song = CGame.GetSong(); song.VideoAspect = _VideoAspect; + _ShowInfoText(CBase.Language.Translate("TR_SCREENSING_ASPECTRATIO").Replace("%a", _VideoAspect.ToString())); + if (CConfig.Config.Debug.SaveModifiedSongs == EOffOn.TR_CONFIG_ON) song.Save(); break; @@ -326,6 +357,8 @@ namespace Vocaluxe.Screens if (CSound.GetLength(_CurrentStream) < (_CurrentTime + 30f)) newTime = CSound.GetLength(_CurrentStream) - 1f; CSound.SetPosition(_CurrentStream, newTime); + + _ShowInfoText(CBase.Language.Translate("TR_SCREENSING_SKIPPEDSECONDS").Replace("%s", "30")); } break; } @@ -1233,6 +1266,7 @@ namespace Vocaluxe.Screens _Lyrics[_LyricSubDuet].Clear(); _Lyrics[_LyricMainTop].Clear(); _Lyrics[_LyricSubTop].Clear(); + _Texts[_TextShortInfoTop].Text = String.Empty; _Texts[_TextSongName].Text = String.Empty; _Texts[_TextDuetName1].Text = String.Empty; _Texts[_TextDuetName2].Text = String.Empty; @@ -1283,7 +1317,9 @@ namespace Vocaluxe.Screens _Lyrics[_LyricMainDuet].Visible = false; _Lyrics[_LyricSubDuet].Visible = false; + _Statics[_StaticShortInfoTop].Visible = false; _Statics[_StaticSongText].Visible = false; + _Texts[_TextShortInfoTop].Visible = false; _Texts[_TextSongName].Visible = false; _Texts[_TextDuetName1].Visible = false; _Texts[_TextDuetName2].Visible = false; From 655c2d22a0aa673c4645f33f79ed5402ead8cdca Mon Sep 17 00:00:00 2001 From: Stefan Date: Mon, 24 Feb 2020 19:44:58 +0100 Subject: [PATCH 137/141] Add Shift+Right Arrow for skipping 10 seconds --- Vocaluxe/Screens/CScreenSing.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index b39eb6cc..8e237bdd 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -346,19 +346,19 @@ namespace Vocaluxe.Screens } break; - // Skip 30 seconds + // Skip 10/30 seconds case Keys.Right: - if (keyEvent.Mod == EModifier.Ctrl && !_Pause && !_Sso.Selection.PartyMode) + if ((keyEvent.Mod == EModifier.Shift || keyEvent.Mod == EModifier.Ctrl) && !_Pause && !_Sso.Selection.PartyMode) { if (_TimerSongText.IsRunning) _TimerSongText.Stop(); - float newTime = _CurrentTime + 30f; - if (CSound.GetLength(_CurrentStream) < (_CurrentTime + 30f)) + float newTime = _CurrentTime + (keyEvent.Mod == EModifier.Shift ? 10f : 30f); + if (CSound.GetLength(_CurrentStream) < newTime) newTime = CSound.GetLength(_CurrentStream) - 1f; CSound.SetPosition(_CurrentStream, newTime); - _ShowInfoText(CBase.Language.Translate("TR_SCREENSING_SKIPPEDSECONDS").Replace("%s", "30")); + _ShowInfoText(CBase.Language.Translate("TR_SCREENSING_SKIPPEDSECONDS").Replace("%s", (keyEvent.Mod == EModifier.Shift ? "10" : "30"))); } break; } From 41449e3bf0c38fb44ad8968bc8aa2b8a08448c69 Mon Sep 17 00:00:00 2001 From: Stefan Date: Mon, 24 Feb 2020 19:47:19 +0100 Subject: [PATCH 138/141] Update Readme.txt Add [SHIFT] + [RIGHT] to sing screen. --- Output/Readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Output/Readme.txt b/Output/Readme.txt index 23859153..edea3878 100644 --- a/Output/Readme.txt +++ b/Output/Readme.txt @@ -157,6 +157,7 @@ Name selection screen Sing screen [P] to toggle pause. [CTRL] + [S] to skip a song if there is another one in the playlist. +[SHIFT] + [RIGHT] to skip 10 seconds within the playing song (not in party modes). [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. From 40ebed56471dd771efb7845570a32a09481d6136 Mon Sep 17 00:00:00 2001 From: lukeIam <2lukeiam@gmail.com> Date: Mon, 16 Mar 2020 15:25:19 +0100 Subject: [PATCH 139/141] -Fix: white space char at the end of the last command line param (fixes #512) --- Vocaluxe/Base/CConfig.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index 5d4fb05a..4b7288bd 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -715,7 +715,7 @@ namespace Vocaluxe.Base Regex spliterVal = new Regex(@"\s", RegexOptions.IgnoreCase); //split arg with Spilter-Regex and save in parts - string[] parts = spliterVal.Split(text, 2); + string[] parts = spliterVal.Split(text.Trim(), 2); switch (parts.Length) { From 75045c6f39fa01409b0aff7b24e97a027ed477a7 Mon Sep 17 00:00:00 2001 From: RumovZ Date: Sat, 25 Apr 2020 10:18:57 +0200 Subject: [PATCH 140/141] sort by initial letter first when sorting by letter --- Vocaluxe/Base/CSongSorter.cs | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Vocaluxe/Base/CSongSorter.cs b/Vocaluxe/Base/CSongSorter.cs index 318ba811..d4b59f13 100644 --- a/Vocaluxe/Base/CSongSorter.cs +++ b/Vocaluxe/Base/CSongSorter.cs @@ -111,6 +111,24 @@ namespace Vocaluxe.Base return res; } + /// + /// Compares two songs by means of: first letter of sorting field, sorting field, title. + /// + private int _SortByLetterFieldTitle(CSongPointer s1, CSongPointer s2) + { + int res = String.Compare(s1.SortString[0].ToString(), s2.SortString[0].ToString(), StringComparison.CurrentCultureIgnoreCase); + return res != 0 ? res : _SortByFieldTitle(s1, s2); + } + + /// + /// Compares two songs by means of: first letter of sorting field, sorting field, artist, title. + /// + private int _SortByLetterFieldArtistTitle(CSongPointer s1, CSongPointer s2) + { + int res = String.Compare(s1.SortString[0].ToString(), s2.SortString[0].ToString(), StringComparison.CurrentCultureIgnoreCase); + return res != 0 ? res : _SortByFieldArtistTitle(s1, s2); + } + private void _AddSongToList(CSong song, List list) { string value = null; @@ -172,11 +190,16 @@ namespace Vocaluxe.Base _AddSongToList(song, sortList); switch (_SongSorting) { - case ESongSorting.TR_CONFIG_ARTIST_LETTER: case ESongSorting.TR_CONFIG_ARTIST: case ESongSorting.TR_CONFIG_NONE: sortList.Sort(_SortByFieldTitle); break; + case ESongSorting.TR_CONFIG_ARTIST_LETTER: + sortList.Sort(_SortByLetterFieldTitle); + break; + case ESongSorting.TR_CONFIG_TITLE_LETTER: + sortList.Sort(_SortByLetterFieldArtistTitle); + break; default: sortList.Sort(_SortByFieldArtistTitle); break; From dad48b9686e6a11e8be3372f1e22ba551f136a6e Mon Sep 17 00:00:00 2001 From: lukeIam <2lukeiam@gmail.com> Date: Fri, 1 May 2020 14:46:21 +0200 Subject: [PATCH 141/141] Autoselect PlatformToolset v142 for PitchTracker if opened in VS2019 --- PitchTracker/PitchTracker.vcxproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PitchTracker/PitchTracker.vcxproj b/PitchTracker/PitchTracker.vcxproj index e601abf7..41ff0000 100644 --- a/PitchTracker/PitchTracker.vcxproj +++ b/PitchTracker/PitchTracker.vcxproj @@ -33,6 +33,7 @@ v120 v140 v141 + v142 Unicode @@ -43,6 +44,7 @@ v120 v140 v141 + v142 Unicode @@ -53,6 +55,7 @@ v120 v140 v141 + v142 true Unicode @@ -64,6 +67,7 @@ v120 v140 v141 + v142 true Unicode