diff --git a/Output/BackgroundMusic/background track license.txt b/Output/BackgroundMusic/DJad - Walking Alone - License.txt similarity index 100% rename from Output/BackgroundMusic/background track license.txt rename to Output/BackgroundMusic/DJad - Walking Alone - License.txt diff --git a/Output/BackgroundMusic/background track.mp3 b/Output/BackgroundMusic/DJad - Walking Alone.mp3 similarity index 100% rename from Output/BackgroundMusic/background track.mp3 rename to Output/BackgroundMusic/DJad - Walking Alone.mp3 diff --git a/Output/Languages/Deutsch.xml b/Output/Languages/Deutsch.xml index bc03d2ed..19f1decd 100644 --- a/Output/Languages/Deutsch.xml +++ b/Output/Languages/Deutsch.xml @@ -123,6 +123,7 @@ Zur Playlist hinzufügen Schließen Zufälligen Song wählen + Zufällige Kategorie wählen Alle Songs singen Alle sichtbaren Songs singen Playlist öffnen diff --git a/Output/Languages/English.xml b/Output/Languages/English.xml index 10b2e4fa..b3e2194f 100644 --- a/Output/Languages/English.xml +++ b/Output/Languages/English.xml @@ -123,6 +123,7 @@ Add to playlist Close Select a random song + Select a random category Sing all songs Sing all visible songs Open playlist diff --git a/Output/Themes/Ambient/MedleyCalcIcon.png b/Output/Themes/Ambient/MedleyCalcIcon.png index 7c1eb21e..25b73f10 100644 Binary files a/Output/Themes/Ambient/MedleyCalcIcon.png and b/Output/Themes/Ambient/MedleyCalcIcon.png differ diff --git a/Output/Themes/Ambient/MedleyTagIcon.png b/Output/Themes/Ambient/MedleyTagIcon.png index 2cfe3f20..2bf40bdc 100644 Binary files a/Output/Themes/Ambient/MedleyTagIcon.png and b/Output/Themes/Ambient/MedleyTagIcon.png differ diff --git a/Output/Themes/Ambient/RepeatIcon.png b/Output/Themes/Ambient/RepeatIcon.png index 6675a41a..ecf82df1 100644 Binary files a/Output/Themes/Ambient/RepeatIcon.png and b/Output/Themes/Ambient/RepeatIcon.png differ diff --git a/Output/Themes/Ambient/Screens/PopupScreenPlayerControl.xml b/Output/Themes/Ambient/Screens/PopupScreenPlayerControl.xml index bc07248e..b30dbca3 100644 --- a/Output/Themes/Ambient/Screens/PopupScreenPlayerControl.xml +++ b/Output/Themes/Ambient/Screens/PopupScreenPlayerControl.xml @@ -10,10 +10,10 @@ 0 0,00 1181 - 50 + 42 - Visible + StaticColor @@ -22,11 +22,11 @@ CoverBackground - 50 - 0 + 55 + 2 0,00 - 50 - 50 + 38 + 38 Visible @@ -36,14 +36,14 @@ - 630 - 0 + 410 + 4 0,00 - 50 + 32 - 650 + 769 StaticColor @@ -70,11 +70,11 @@ PlayIcon - 200 - 5 + 146 + 8 0,00 - 40 - 40 + 28 + 28 ButtonColor @@ -119,11 +119,11 @@ PauseIcon - 200 - 5 + 145 + 8 0,00 - 40 - 40 + 28 + 28 ButtonColor @@ -168,11 +168,11 @@ PreviousIcon - 125 - 0 + 100 + 2 0,00 - 50 - 50 + 38 + 38 ButtonColor @@ -217,11 +217,11 @@ NextIcon - 265 - 0 + 185 + 2 0,00 - 50 - 50 + 38 + 38 ButtonColor @@ -266,11 +266,11 @@ RepeatIcon - 330 - 0 + 225 + 2 0,00 - 50 - 50 + 38 + 38 ButtonColor @@ -311,15 +311,15 @@ - VideoIcon + VideoIconCO - VideoIcon + VideoIconCO - 405 - 0 + 270 + 2 0,00 - 50 - 50 + 38 + 38 ButtonColor @@ -364,11 +364,11 @@ DuetIcon - 555 - 0 + 360 + 2 0,00 - 50 - 50 + 38 + 38 ButtonColor @@ -409,15 +409,15 @@ - VideoIcon + VideoIconBG - VideoIcon + VideoIconBG - 480 - 0 + 315 + 2 0,00 - 50 - 50 + 38 + 38 ButtonColor @@ -457,4 +457,4 @@ - \ No newline at end of file + diff --git a/Output/Themes/Ambient/Screens/ScreenSong.xml b/Output/Themes/Ambient/Screens/ScreenSong.xml index dfe2d5a7..c4212e3c 100644 --- a/Output/Themes/Ambient/Screens/ScreenSong.xml +++ b/Output/Themes/Ambient/Screens/ScreenSong.xml @@ -473,6 +473,55 @@ + + + Button + + Button + + 40 + 90 + -2,11 + 360 + 40 + + + ButtonColor + + + ButtonSColor + + + 180 + 5 + + 30 + + 350 + + + ButtonTextColor + + + ButtonTextSColor + + Center + + Center + + + + Outline + + TR_SCREENSONG_BUTTON_RANDOMCAT + + + + + + + + Button @@ -1162,10 +1211,10 @@ SelectSlide - 0 + 52 28 -1,01 - 343 + 241 24 54 @@ -1174,7 +1223,7 @@ 20 20 - 235 + 271 30 -1,02 20 diff --git a/Output/Themes/Ambient/Skin Blue.xml b/Output/Themes/Ambient/Skin Blue.xml index 64b055f6..08caa194 100644 --- a/Output/Themes/Ambient/Skin Blue.xml +++ b/Output/Themes/Ambient/Skin Blue.xml @@ -317,6 +317,8 @@ EnergyBeam.png DuetIcon.png VideoIcon.png + VideoIconCO.png + VideoIconBG.png MedleyCalcIcon.png MedleyTagIcon.png Invisible.png @@ -338,4 +340,4 @@ [Blue]IntroMid.mp4 [Blue]IntroOut.mp4 - \ No newline at end of file + diff --git a/Output/Themes/Ambient/Skin Green.xml b/Output/Themes/Ambient/Skin Green.xml index 20c3ebe3..cfbca51f 100644 --- a/Output/Themes/Ambient/Skin Green.xml +++ b/Output/Themes/Ambient/Skin Green.xml @@ -311,6 +311,8 @@ EnergyBeam.png DuetIcon.png VideoIcon.png + VideoIconCO.png + VideoIconBG.png MedleyCalcIcon.png MedleyTagIcon.png Invisible.png @@ -332,4 +334,4 @@ [Green]IntroMid.mp4 [Green]IntroOut.mp4 - \ No newline at end of file + diff --git a/Output/Themes/Ambient/Skin Red.xml b/Output/Themes/Ambient/Skin Red.xml index 3a187e67..546b21d8 100644 --- a/Output/Themes/Ambient/Skin Red.xml +++ b/Output/Themes/Ambient/Skin Red.xml @@ -311,6 +311,8 @@ EnergyBeam.png DuetIcon.png VideoIcon.png + VideoIconCO.png + VideoIconBG.png MedleyCalcIcon.png MedleyTagIcon.png Invisible.png @@ -332,4 +334,4 @@ [Red]IntroMid.mp4 [Red]IntroOut.mp4 - \ No newline at end of file + diff --git a/Output/Themes/Ambient/Skin Yellow.xml b/Output/Themes/Ambient/Skin Yellow.xml index 9735075b..1a023e87 100644 --- a/Output/Themes/Ambient/Skin Yellow.xml +++ b/Output/Themes/Ambient/Skin Yellow.xml @@ -311,6 +311,8 @@ EnergyBeam.png DuetIcon.png VideoIcon.png + VideoIconCO.png + VideoIconBG.png MedleyCalcIcon.png MedleyTagIcon.png Invisible.png @@ -332,4 +334,4 @@ [Yellow]IntroMid.mp4 [Yellow]IntroOut.mp4 - \ No newline at end of file + diff --git a/Output/Themes/Ambient/VideoIconBG.png b/Output/Themes/Ambient/VideoIconBG.png new file mode 100644 index 00000000..ff0950fe Binary files /dev/null and b/Output/Themes/Ambient/VideoIconBG.png differ diff --git a/Output/Themes/Ambient/VideoIconCO.png b/Output/Themes/Ambient/VideoIconCO.png new file mode 100644 index 00000000..3c76dd30 Binary files /dev/null and b/Output/Themes/Ambient/VideoIconCO.png differ diff --git a/Output/Themes/Changelog/Changelog_ScreenSong.txt b/Output/Themes/Changelog/Changelog_ScreenSong.txt index c1402b34..7d2e320c 100644 --- a/Output/Themes/Changelog/Changelog_ScreenSong.txt +++ b/Output/Themes/Changelog/Changelog_ScreenSong.txt @@ -6,7 +6,7 @@ Version 3: Add: -, , , , , , , +, , , , , , , , , , and as a new Screen-Element. For details, look at ScreenSong.xml diff --git a/Vocaluxe/Base/CBackgroundMusic.cs b/Vocaluxe/Base/CBackgroundMusic.cs index 17657e6a..ad10b81a 100644 --- a/Vocaluxe/Base/CBackgroundMusic.cs +++ b/Vocaluxe/Base/CBackgroundMusic.cs @@ -34,6 +34,7 @@ namespace Vocaluxe.Base private static bool _Playing; private static bool _Disabled; private static bool _CanSing; + private static bool _RepeatSong; public static bool VideoEnabled { @@ -84,6 +85,18 @@ namespace Vocaluxe.Base } } + public static bool RepeatSong + { + get + { + return _RepeatSong; + } + set + { + _RepeatSong = value; + } + } + public static int SongID { get @@ -120,7 +133,10 @@ namespace Vocaluxe.Base { get { - return _CurrentPlaylistElement.Artist + " - " + _CurrentPlaylistElement.Title; + if (_CurrentPlaylistElement.Artist != "" && _CurrentPlaylistElement.Title != "") + return _CurrentPlaylistElement.Artist + " - " + _CurrentPlaylistElement.Title; + else + return Path.GetFileNameWithoutExtension(_CurrentPlaylistElement.MusicFilePath); } } @@ -225,7 +241,14 @@ namespace Vocaluxe.Base bool finished = CSound.IsFinished(_CurrentMusicStream); if (_Playing && (timeToPlay <= CSettings.BackgroundMusicFadeTime || finished)) - Next(); + if (_RepeatSong) + { + CSound.SetPosition(_CurrentMusicStream, 0); + if (_VideoEnabled && _Video != -1) + CVideo.VdSkip(_Video, 0f, _CurrentPlaylistElement.VideoGap); + } + else + Next(); } } @@ -271,25 +294,30 @@ namespace Vocaluxe.Base { if (_PreviousFileNames.Count > 0 || _PreviousMusicIndex >= 0) { - Stop(); + float pos = CSound.GetPosition(_CurrentMusicStream); + if (CSound.GetPosition(_CurrentMusicStream) >= 1.5f) + { + CSound.SetPosition(_CurrentMusicStream, 0); + if (_VideoEnabled && _Video != -1) + CVideo.VdSkip(_Video, 0f, _CurrentPlaylistElement.VideoGap); + } + else + { + Stop(); + _PreviousMusicIndex--; + if (_PreviousMusicIndex < 0) + _PreviousMusicIndex = 0; //No previous songs left, so play the first - _PreviousMusicIndex--; - if (_PreviousMusicIndex < 0) - _PreviousMusicIndex = 0; //No previous songs left, so play the first + _CurrentPlaylistElement = _PreviousFileNames[_PreviousMusicIndex]; - _CurrentPlaylistElement = _PreviousFileNames[_PreviousMusicIndex]; - - _CurrentMusicStream = CSound.Load(_CurrentPlaylistElement.MusicFilePath); - if (_VideoEnabled) - LoadVideo(); - CSound.SetStreamVolume(_CurrentMusicStream, 0f); - Play(); + _CurrentMusicStream = CSound.Load(_CurrentPlaylistElement.MusicFilePath); + if (_VideoEnabled) + LoadVideo(); + CSound.SetStreamVolume(_CurrentMusicStream, 0f); + Play(); + } } - } - - public static void Repeat() - { - if (_AllFileNames.Count > 0 && _CurrentMusicStream != -1) + else if (_CurrentMusicStream != -1) { CSound.SetPosition(_CurrentMusicStream, 0); if (_VideoEnabled && _Video != -1) @@ -519,7 +547,7 @@ class PlaylistElement if (_Song != null) return _Song.Title; - return "Unknown"; + return ""; } } @@ -530,7 +558,7 @@ class PlaylistElement if (_Song != null) return _Song.Artist; - return "Unknown"; + return ""; } } diff --git a/Vocaluxe/Base/CSongs.cs b/Vocaluxe/Base/CSongs.cs index cc33b1ed..147e1c01 100644 --- a/Vocaluxe/Base/CSongs.cs +++ b/Vocaluxe/Base/CSongs.cs @@ -56,6 +56,7 @@ namespace Vocaluxe.Base private static int _CoverLoadIndex = -1; private static int _CatIndex = -1; private static List _Categories = new List(); + private static List _CategoriesForRandom = new List(); private static Stopwatch _CoverLoadTimer = new Stopwatch(); @@ -275,6 +276,35 @@ namespace Vocaluxe.Base _SongsForRandom.AddRange(VisibleSongs); } + public static int GetRandomCategory() + { + if (_CategoriesForRandom.Count == 0) + UpdateRandomCategoryList(); + + if (_CategoriesForRandom.Count == 0) + return -1; + + CCategory category = _CategoriesForRandom[CGame.Rand.Next(0, _CategoriesForRandom.Count - 1)]; + _CategoriesForRandom.Remove(category); + return GetCategoryNumber(category); + } + + public static void UpdateRandomCategoryList() + { + _CategoriesForRandom.Clear(); + _CategoriesForRandom.AddRange(Categories); + } + + private static int GetCategoryNumber(CCategory category) + { + for (int i = 0; i < Categories.Length; i++) + { + if (Categories[i] == category) + return i; + } + return -1; + } + public static CSong[] AllSongs { get { return _Songs.ToArray(); } diff --git a/Vocaluxe/Lib/Playlist/CPlaylistFile.cs b/Vocaluxe/Lib/Playlist/CPlaylistFile.cs index 2d2d959b..57e9fb55 100644 --- a/Vocaluxe/Lib/Playlist/CPlaylistFile.cs +++ b/Vocaluxe/Lib/Playlist/CPlaylistFile.cs @@ -205,6 +205,10 @@ namespace Vocaluxe.Lib.Playlist song.GameMode = gm; Songs.Add(song); } + else + { + CLog.LogError("Can't find song '" + title + "' from '" + artist + "' in playlist file: " + PlaylistFile); + } } } else diff --git a/Vocaluxe/Menu/SongMenu/CSongMenu.cs b/Vocaluxe/Menu/SongMenu/CSongMenu.cs index ee16ee9c..5e1836d9 100644 --- a/Vocaluxe/Menu/SongMenu/CSongMenu.cs +++ b/Vocaluxe/Menu/SongMenu/CSongMenu.cs @@ -103,6 +103,11 @@ namespace Vocaluxe.Menu.SongMenu return _SongMenu.GetSelectedCategory(); } + public void SetSelectedCategory(int CategoryNr) + { + _SongMenu.SetSelectedCategory(CategoryNr); + } + public int GetActualSelection() { return _SongMenu.GetActualSelection(); diff --git a/Vocaluxe/Menu/SongMenu/CSongMenuFramework.cs b/Vocaluxe/Menu/SongMenu/CSongMenuFramework.cs index 75cdcd9c..045ec139 100644 --- a/Vocaluxe/Menu/SongMenu/CSongMenuFramework.cs +++ b/Vocaluxe/Menu/SongMenu/CSongMenuFramework.cs @@ -541,6 +541,12 @@ namespace Vocaluxe.Menu.SongMenu return; } + public virtual void SetSelectedCategory(int CategoryNr) + { + if (!_Initialized) + return; + } + public virtual void SetSmallView(bool SmallView) { if (!_Initialized) diff --git a/Vocaluxe/Menu/SongMenu/CSongMenuTileBoard.cs b/Vocaluxe/Menu/SongMenu/CSongMenuTileBoard.cs index dc5c4d4f..4d9336e1 100644 --- a/Vocaluxe/Menu/SongMenu/CSongMenuTileBoard.cs +++ b/Vocaluxe/Menu/SongMenu/CSongMenuTileBoard.cs @@ -566,6 +566,62 @@ namespace Vocaluxe.Menu.SongMenu } + public override void SetSelectedCategory(int CategoryNr) + { + base.SetSelectedCategory(CategoryNr); + + if (CategoryNr < 0) + return; + + if (CSongs.Categories.Length > CategoryNr) + { + bool sel = false; + foreach (CStatic tile in _Tiles) + { + if (tile.Selected) + { + sel = true; + break; + } + } + + if (_Locked == -1 || !sel) + { + if (_PreviewSelected > -1) + { + _Locked = _PreviewSelected; + } + else + { + _Locked = 0; + _actualSelection = 0; + _PreviewSelected = 0; + SetSelectedNow(); + UpdateList(0); + } + } + + foreach (CStatic tile in _Tiles) + { + tile.Selected = false; + } + + _PreviewSelected = CategoryNr; + SetSelectedNow(); + _Locked = CategoryNr; + + UpdateList((CategoryNr / _NumW) * _NumW - (_NumW * (_NumH - 2))); + + _PreviewSelected = _Locked; + _actualSelection = _Locked; + + for (int i = 0; i < _Tiles.Count; i++) + { + _Tiles[i].Selected = _Locked == i + _Offset; + } + } + } + protected override void EnterCategory(int cat) { base.EnterCategory(cat); diff --git a/Vocaluxe/Menu/SongMenu/ISongMenu.cs b/Vocaluxe/Menu/SongMenu/ISongMenu.cs index edb1142d..8361daba 100644 --- a/Vocaluxe/Menu/SongMenu/ISongMenu.cs +++ b/Vocaluxe/Menu/SongMenu/ISongMenu.cs @@ -25,6 +25,7 @@ namespace Vocaluxe.Menu.SongMenu void SetActive(bool Active); int GetSelectedCategory(); + void SetSelectedCategory(int CategoryNr); int GetActualSelection(); bool IsSelected(); diff --git a/Vocaluxe/Screens/CPopupScreenPlayerControl.cs b/Vocaluxe/Screens/CPopupScreenPlayerControl.cs index 8e7d8ad9..f1b206b2 100644 --- a/Vocaluxe/Screens/CPopupScreenPlayerControl.cs +++ b/Vocaluxe/Screens/CPopupScreenPlayerControl.cs @@ -134,7 +134,7 @@ namespace Vocaluxe.Screens if (Buttons[htButtons(ButtonPause)].Selected) CBackgroundMusic.Pause(); if (Buttons[htButtons(ButtonRepeat)].Selected) - CBackgroundMusic.Repeat(); + CBackgroundMusic.RepeatSong = !CBackgroundMusic.RepeatSong; if (Buttons[htButtons(ButtonShowVideo)].Selected) VideoPreview = !VideoPreview; if (Buttons[htButtons(ButtonSing)].Selected) @@ -162,7 +162,7 @@ namespace Vocaluxe.Screens if (Buttons[htButtons(ButtonPause)].Selected) CBackgroundMusic.Pause(); if (Buttons[htButtons(ButtonRepeat)].Selected) - CBackgroundMusic.Repeat(); + CBackgroundMusic.RepeatSong = !CBackgroundMusic.RepeatSong; if (Buttons[htButtons(ButtonShowVideo)].Selected) VideoPreview = !VideoPreview; if (Buttons[htButtons(ButtonSing)].Selected) @@ -187,6 +187,7 @@ namespace Vocaluxe.Screens Statics[htStatics(StaticCover)].Visible = !_VideoPreview || !CBackgroundMusic.SongHasVideo; Buttons[htButtons(ButtonToBackgroundVideo)].Pressed = VideoBackground; Buttons[htButtons(ButtonShowVideo)].Pressed = _VideoPreview; + Buttons[htButtons(ButtonRepeat)].Pressed = CBackgroundMusic.RepeatSong; Buttons[htButtons(ButtonSing)].Visible = CBackgroundMusic.CanSing; return true; } diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index 09239a8c..e26b3451 100644 --- a/Vocaluxe/Screens/CScreenSong.cs +++ b/Vocaluxe/Screens/CScreenSong.cs @@ -38,6 +38,7 @@ namespace Vocaluxe.Screens private const string ButtonOptionsPlaylist = "ButtonOptionsPlaylist"; private const string ButtonOptionsClose = "ButtonOptionsClose"; private const string ButtonOptionsRandom = "ButtonOptionsRandom"; + private const string ButtonOptionsRandomCategory = "ButtonOptionsRandomCategory"; private const string ButtonOptionsSingAll = "ButtonOptionsSingAll"; private const string ButtonOptionsSingAllVisible = "ButtonOptionsSingAllVisible"; private const string ButtonOptionsOpenPlaylist = "ButtonOptionsOpenPlaylist"; @@ -78,7 +79,7 @@ namespace Vocaluxe.Screens _ScreenVersion = ScreenVersion; _ThemeStatics = new string[] { StaticSearchBar, StaticOptionsBG }; _ThemeTexts = new string[] { TextCategory, TextSelection, TextSearchBarTitle, TextSearchBar, TextOptionsTitle }; - _ThemeButtons = new string[] { ButtonOptionsClose, ButtonOptionsPlaylist, ButtonOptionsSing, ButtonOptionsRandom, ButtonOptionsSingAll, ButtonOptionsSingAllVisible, ButtonOptionsOpenPlaylist, ButtonOpenOptions }; + _ThemeButtons = new string[] { ButtonOptionsClose, ButtonOptionsPlaylist, ButtonOptionsSing, ButtonOptionsRandom, ButtonOptionsRandomCategory, ButtonOptionsSingAll, ButtonOptionsSingAllVisible, ButtonOptionsOpenPlaylist, ButtonOpenOptions }; _ThemeSelectSlides = new string[] { SelectSlideOptionsMode, SelectSlideOptionsPlaylistAdd, SelectSlideOptionsPlaylistOpen }; _ThemeSongMenus = new string[] { SongMenu }; _ThemePlaylists = new string[] { Playlist }; @@ -94,6 +95,7 @@ namespace Vocaluxe.Screens Buttons[htButtons(ButtonOptionsSing)].Visible = false; Buttons[htButtons(ButtonOptionsPlaylist)].Visible = false; Buttons[htButtons(ButtonOptionsRandom)].Visible = false; + Buttons[htButtons(ButtonOptionsRandomCategory)].Visible = false; Buttons[htButtons(ButtonOptionsSingAll)].Visible = false; Buttons[htButtons(ButtonOptionsSingAllVisible)].Visible = false; Buttons[htButtons(ButtonOptionsOpenPlaylist)].Visible = false; @@ -237,13 +239,20 @@ namespace Vocaluxe.Screens { SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong()); } + else if (CSongs.Category == -1 && KeyEvent.Mod == Modifier.Ctrl) + { + SongMenus[htSongMenus(SongMenu)].SetSelectedCategory(CSongs.GetRandomCategory()); + } break; //TODO: Delete that! case Keys.S: if (!_SearchActive && CSongs.NumVisibleSongs > 0) + { StartMedleySong(SongMenus[htSongMenus(SongMenu)].GetSelectedSong()); + } break; + } } } @@ -273,6 +282,13 @@ namespace Vocaluxe.Screens SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong()); } } + else if (Buttons[htButtons(ButtonOptionsRandom)].Selected) + { + if (CSongs.Category == -1) + { + SongMenus[htSongMenus(SongMenu)].SetSelectedCategory(CSongs.GetRandomCategory()); + } + } else if (Buttons[htButtons(ButtonOptionsSingAll)].Selected) { StartRandomAllSongs(); @@ -338,8 +354,14 @@ namespace Vocaluxe.Screens if (MouseEvent.MB && CSongs.Category != -1) { + Console.WriteLine("MB pressed"); SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong()); } + else if (MouseEvent.MB && CSongs.Category == -1) + { + Console.WriteLine("MB pressed"); + SongMenus[htSongMenus(SongMenu)].SetSelectedCategory(CSongs.GetRandomCategory()); + } else SongMenus[htSongMenus(SongMenu)].HandleMouse(ref MouseEvent); @@ -389,6 +411,13 @@ namespace Vocaluxe.Screens SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong()); } } + else if (Buttons[htButtons(ButtonOptionsRandomCategory)].Selected) + { + if (CSongs.Category == -1) + { + SongMenus[htSongMenus(SongMenu)].SetSelectedCategory(CSongs.GetRandomCategory()); + } + } else if (Buttons[htButtons(ButtonOptionsSingAll)].Selected) { ToggleSongOptions(ESongOptionsView.None); @@ -689,6 +718,7 @@ namespace Vocaluxe.Screens else if (view == ESongOptionsView.General) { Buttons[htButtons(ButtonOptionsRandom)].Visible = CSongs.Category != -1; + Buttons[htButtons(ButtonOptionsRandomCategory)].Visible = CSongs.Category == -1; Buttons[htButtons(ButtonOptionsSingAll)].Visible = true; Buttons[htButtons(ButtonOptionsSingAllVisible)].Visible = CSongs.Category != -1; @@ -723,6 +753,7 @@ namespace Vocaluxe.Screens Buttons[htButtons(ButtonOptionsSing)].Visible = false; Buttons[htButtons(ButtonOptionsPlaylist)].Visible = false; Buttons[htButtons(ButtonOptionsRandom)].Visible = false; + Buttons[htButtons(ButtonOptionsRandomCategory)].Visible = false; Buttons[htButtons(ButtonOptionsSingAll)].Visible = false; Buttons[htButtons(ButtonOptionsSingAllVisible)].Visible = false; Buttons[htButtons(ButtonOptionsOpenPlaylist)].Visible = false;