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 diff --git a/Output/Themes/Changelog/Changelog_ScreenSong.txt b/Output/Themes/Changelog/Changelog_ScreenSong.txt index 89d4820b..7b5e00a2 100644 --- a/Output/Themes/Changelog/Changelog_ScreenSong.txt +++ b/Output/Themes/Changelog/Changelog_ScreenSong.txt @@ -1,5 +1,28 @@ ScreenSong +++++++++++ +Version 10: + +Add: + + +++++++++++ +Version 9: + +Add: + + +Changed values at: + + +++++++++++ +Version 8: + +Add: + to SongMenu + + + ++++++++++ Version 7: 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 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 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 diff --git a/Output/Themes/Genius/ListIcon.png b/Output/Themes/Genius/ListIcon.png new file mode 100644 index 00000000..33bd9d47 Binary files /dev/null and b/Output/Themes/Genius/ListIcon.png differ diff --git a/Output/Themes/Genius/Screens/ScreenSong.xml b/Output/Themes/Genius/Screens/ScreenSong.xml index f5abfa40..61852554 100644 --- a/Output/Themes/Genius/Screens/ScreenSong.xml +++ b/Output/Themes/Genius/Screens/ScreenSong.xml @@ -2,7 +2,7 @@ ScreenSong - 8 + 10 @@ -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 + + @@ -990,16 +1004,16 @@ 10 10 - 375 + 410 42 - 850 + 830 555 -1 - 375 + 410 42 - 450 + 410 550 -1 @@ -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 + + @@ -1432,6 +1460,33 @@ + + ListIcon + ListIcon + + 1120 + 548 + 35 + 35 + -1.01 + + + + + 180 + 5 + 0 + 25 + 350 + + + Center + Center + + Outline + + + DeleteIcon DeleteIcon diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index 5d4fb05a..33ce96e2 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -688,7 +688,7 @@ namespace Vocaluxe.Base { //Check if folder exists if (Directory.Exists(folder)) - SongFolders.Add(folder); + SongFolders.Add(Path.GetFullPath(folder)); } } @@ -853,4 +853,4 @@ namespace Vocaluxe.Base } } } -} \ No newline at end of file +} 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 +} diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index 2d3f3a75..2e9f892c 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(); @@ -836,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 >= 1.9) ? EAspect.LetterBox : EAspect.Crop); aspect = _VideoAspect; SRectF rect = CHelper.FitInBounds(bounds, background.OrigAspect, aspect); @@ -1119,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)); @@ -1181,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) { diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index 730f52f8..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 8; } + 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! @@ -363,13 +368,20 @@ namespace Vocaluxe.Screens _ShowHighscore(); } break; + + case Keys.L: + if (keyEvent.Mod == EModifier.Ctrl) + { + _TogglePlaylistFilter(); + } + break; } if (!_SearchActive) { switch (keyEvent.Key) { case Keys.Space: - if (!_Sso.Selection.PartyMode) + if (!_Sso.Selection.PartyMode && !_Playlist.isPlaylistNameEditMode()) _ToggleSongOptions(ESongOptionsView.General); break; @@ -499,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)) { @@ -869,9 +886,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); @@ -1202,7 +1216,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 +1225,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 +1243,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) @@ -1253,6 +1267,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); 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); } 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 +} diff --git a/VocaluxeLib/Menu/CMenuPartySongSelection.cs b/VocaluxeLib/Menu/CMenuPartySongSelection.cs index 815d4ded..44e609e9 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,12 @@ namespace VocaluxeLib.Menu _SongMode = _SelectSlides[_SelectSlideSongMode].Selection; _Source = _SelectSlides[_SelectSlideSource].Selection; NumMedleySongs = NumMinMedleySongs + _SelectSlides[_SelectSlideNumMedleySongs].Selection; - Playlist = _SelectSlides[_SelectSlidePlaylist].Selection; + + int playlistSelection = _SelectSlides[_SelectSlidePlaylist].Selection; + if (playlistSelection >= 0 && playlistSelection < _PlaylistIDs.Count) + Playlist = _PlaylistIDs[playlistSelection]; + else + Playlist = -1; if (_SelectSlides[_SelectSlideSorting].Selection != _Sorting) { diff --git a/VocaluxeLib/Menu/CPlaylist.cs b/VocaluxeLib/Menu/CPlaylist.cs index 0a523d21..13388a46 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(); @@ -492,7 +500,7 @@ namespace VocaluxeLib.Menu break; case Keys.Enter: - _StartPlaylistSong(_CurrentPlaylistElement); + _StartPlaylistSong(_CurrentPlaylistElement + _Offset); break; case Keys.Add: //move the selected song up @@ -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 = @@ -818,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) @@ -972,6 +989,11 @@ namespace VocaluxeLib.Menu return false; } + public bool isPlaylistNameEditMode() + { + return _EditMode == EEditMode.PlaylistName; + } + private void _PrepareList() { _PlaylistElements.Clear(); @@ -1166,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 @@ -1197,4 +1228,4 @@ namespace VocaluxeLib.Menu } #endregion ThemeEdit } -} \ No newline at end of file +} 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; diff --git a/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs b/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs index b2cb4f86..4d9f1746 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(); @@ -173,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, ""); @@ -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; 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; 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;