From eb2e9b8c5ca691a00634675f724272526272e0c1 Mon Sep 17 00:00:00 2001 From: Jiiniasu Date: Sun, 15 Jul 2018 00:04:21 +0200 Subject: [PATCH 01/36] 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 02/36] 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 7838b26b0f160a6bdf7552c48bc0deee71fd454a Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 2 Feb 2020 11:39:54 +0100 Subject: [PATCH 03/36] 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 04/36] 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 05/36] 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 06/36] 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 07/36] 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 08/36] 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 09/36] 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 10/36] 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 11/36] 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 12/36] 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 13/36] 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 14/36] 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 15/36] 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 16/36] 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 17/36] 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 18/36] 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 19/36] 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 20/36] 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 21/36] 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 22/36] 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 23/36] 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 24/36] 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 25/36] 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 26/36] 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 27/36] 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 28/36] 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 29/36] 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 30/36] 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 31/36] 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 32/36] 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 33/36] 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 34/36] 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 35/36] 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 36/36] 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;