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/Screens/ScreenSong.xml b/Output/Themes/Ambient/Screens/ScreenSong.xml index dfe2d5a7..1ad7adb2 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 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/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 7f437ab0..7b22e96d 100644 --- a/Vocaluxe/Menu/SongMenu/CSongMenu.cs +++ b/Vocaluxe/Menu/SongMenu/CSongMenu.cs @@ -98,6 +98,11 @@ namespace Vocaluxe.Menu.SongMenu return _SongMenu.GetSelectedCategory(); } + public void SetSelectedCategory(int CategoryNr) + { + _SongMenu.SetSelectedCategory(CategoryNr); + } + public int GetActualSelection() { return _SongMenu.GetActualSelection(); @@ -138,6 +143,16 @@ namespace Vocaluxe.Menu.SongMenu _SongMenu.SetSmallView(SmallView); } + public void ToggleVideoFull() + { + _SongMenu.ToggleVideoFull(); + } + + public bool IsVideoFull() + { + return _SongMenu.IsVideoFull(); + } + #endregion ISongMenu #region IMenuElement diff --git a/Vocaluxe/Menu/SongMenu/CSongMenuFramework.cs b/Vocaluxe/Menu/SongMenu/CSongMenuFramework.cs index 5dbfe865..4f1a9e13 100644 --- a/Vocaluxe/Menu/SongMenu/CSongMenuFramework.cs +++ b/Vocaluxe/Menu/SongMenu/CSongMenuFramework.cs @@ -484,6 +484,9 @@ namespace Vocaluxe.Menu.SongMenu _timer.Stop(); _timer.Reset(); _SelectedInternal = _SelectedPending; + + if (IsVideoFull()) + ToggleVideoFull(); } public virtual void HandleInput(ref KeyEvent KeyEvent) @@ -536,6 +539,12 @@ namespace Vocaluxe.Menu.SongMenu return; } + public virtual void SetSelectedCategory(int CategoryNr) + { + if (!_Initialized) + return; + } + public virtual void SetSmallView(bool SmallView) { if (!_Initialized) @@ -547,6 +556,17 @@ namespace Vocaluxe.Menu.SongMenu return false; } + public virtual void ToggleVideoFull() + { + if (!_Initialized) + return; + } + + public virtual bool IsVideoFull() + { + return false; + } + public virtual void UnloadTextures() { } diff --git a/Vocaluxe/Menu/SongMenu/CSongMenuTileBoard.cs b/Vocaluxe/Menu/SongMenu/CSongMenuTileBoard.cs index 10a86dbb..1c1393b8 100644 --- a/Vocaluxe/Menu/SongMenu/CSongMenuTileBoard.cs +++ b/Vocaluxe/Menu/SongMenu/CSongMenuTileBoard.cs @@ -41,6 +41,7 @@ namespace Vocaluxe.Menu.SongMenu private int _actualSelection = -1; private bool _SmallView = false; + private bool _VidFull = false; public override int GetActualSelection() { @@ -359,6 +360,10 @@ namespace Vocaluxe.Menu.SongMenu } else if (_PreviewSelected != -1 && MouseEvent.LB && CSongs.Category != -1) { + if (CHelper.IsInBounds(_VideoIcon.Rect, MouseEvent)) + { + ToggleVideoFull(); + } if (CHelper.IsInBounds(_CoverBig.Rect, MouseEvent) || CHelper.IsInBounds(_TextBG.Rect, MouseEvent)) { _Locked = _PreviewSelected; @@ -375,6 +380,10 @@ namespace Vocaluxe.Menu.SongMenu } } } + else if (MouseEvent.LB && CHelper.IsInBounds(_VideoIcon.Rect, MouseEvent)) + { + ToggleVideoFull(); + } if (MouseEvent.Wheel > 0) { @@ -472,14 +481,26 @@ namespace Vocaluxe.Menu.SongMenu if (_vidtex.index != -1 && _Video != -1) { - RectangleF bounds = new RectangleF(_CoverBig.Rect.X, _CoverBig.Rect.Y, _CoverBig.Rect.W, _CoverBig.Rect.H); - RectangleF rect = new RectangleF(0f, 0f, _vidtex.width, _vidtex.height); - CHelper.SetRect(bounds, ref rect, rect.Width / rect.Height, EAspect.Crop); + if (_VidFull) + { + RectangleF bounds = new RectangleF(0, 0, CSettings.iRenderW, CSettings.iRenderH); + RectangleF rect = new RectangleF(0f, 0f, _vidtex.width, _vidtex.height); + CHelper.SetRect(bounds, ref rect, rect.Width / rect.Height, EAspect.Crop); - CDraw.DrawTexture(_vidtex, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _CoverBig.Rect.Z), - _vidtex.color, new SRectF(bounds.X, bounds.Y, bounds.Width, bounds.Height, 0f), false); - CDraw.DrawTextureReflection(_vidtex, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _CoverBig.Rect.Z), - _vidtex.color, new SRectF(bounds.X, bounds.Y, bounds.Width, bounds.Height, 0f), _CoverBig.ReflectionSpace, _CoverBig.ReflectionHeight); + CDraw.DrawTexture(_vidtex, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, CSettings.zNear), + _vidtex.color, new SRectF(bounds.X, bounds.Y, bounds.Width, bounds.Height, 0f), false); + } + else + { + RectangleF bounds = new RectangleF(_CoverBig.Rect.X, _CoverBig.Rect.Y, _CoverBig.Rect.W, _CoverBig.Rect.H); + RectangleF rect = new RectangleF(0f, 0f, _vidtex.width, _vidtex.height); + CHelper.SetRect(bounds, ref rect, rect.Width / rect.Height, EAspect.Crop); + + CDraw.DrawTexture(_vidtex, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _CoverBig.Rect.Z), + _vidtex.color, new SRectF(bounds.X, bounds.Y, bounds.Width, bounds.Height, 0f), false); + CDraw.DrawTextureReflection(_vidtex, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _CoverBig.Rect.Z), + _vidtex.color, new SRectF(bounds.X, bounds.Y, bounds.Width, bounds.Height, 0f), _CoverBig.ReflectionSpace, _CoverBig.ReflectionHeight); + } } @@ -556,6 +577,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); @@ -737,6 +814,16 @@ namespace Vocaluxe.Menu.SongMenu return _SmallView; } + public override void ToggleVideoFull() + { + _VidFull = !_VidFull; + } + + public override bool IsVideoFull() + { + return _VidFull; + } + public override void LoadTextures() { base.LoadTextures(); diff --git a/Vocaluxe/Menu/SongMenu/ISongMenu.cs b/Vocaluxe/Menu/SongMenu/ISongMenu.cs index a859e84b..18251b88 100644 --- a/Vocaluxe/Menu/SongMenu/ISongMenu.cs +++ b/Vocaluxe/Menu/SongMenu/ISongMenu.cs @@ -24,6 +24,7 @@ namespace Vocaluxe.Menu.SongMenu void SetActive(bool Active); int GetSelectedCategory(); + void SetSelectedCategory(int CategoryNr); int GetActualSelection(); bool IsSelected(); @@ -32,6 +33,9 @@ namespace Vocaluxe.Menu.SongMenu bool IsVisible(); void SetVisible(bool Visible); + void ToggleVideoFull(); + bool IsVideoFull(); + bool IsSmallView(); void SetSmallView(bool SmallView); diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index b559b027..99640046 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"; @@ -73,7 +74,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 }; @@ -89,6 +90,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; @@ -145,7 +147,9 @@ namespace Vocaluxe.Screens switch (KeyEvent.Key) { case Keys.Escape: - if (CSongs.Category < 0 || CConfig.Tabs == EOffOn.TR_CONFIG_OFF) + if (SongMenus[htSongMenus(SongMenu)].IsVideoFull()) + SongMenus[htSongMenus(SongMenu)].ToggleVideoFull(); + else if (CSongs.Category < 0 || CConfig.Tabs == EOffOn.TR_CONFIG_OFF) CGraphics.FadeTo(EScreens.ScreenMain); break; @@ -153,7 +157,11 @@ namespace Vocaluxe.Screens if (CSongs.NumVisibleSongs > 0) { if (SongMenus[htSongMenus(SongMenu)].GetSelectedSong() != -1 && !_SongOptionsActive) + { ToggleSongOptions(ESongOptionsView.Song); + if (SongMenus[htSongMenus(SongMenu)].IsVideoFull()) + SongMenus[htSongMenus(SongMenu)].ToggleVideoFull(); + } } break; @@ -178,6 +186,8 @@ namespace Vocaluxe.Screens break; case Keys.Space: + if (SongMenus[htSongMenus(SongMenu)].IsVideoFull()) + SongMenus[htSongMenus(SongMenu)].ToggleVideoFull(); ToggleSongOptions(ESongOptionsView.General); break; @@ -191,6 +201,8 @@ namespace Vocaluxe.Screens else { _SearchActive = true; + if (SongMenus[htSongMenus(SongMenu)].IsVideoFull()) + SongMenus[htSongMenus(SongMenu)].ToggleVideoFull(); } break; @@ -219,6 +231,8 @@ namespace Vocaluxe.Screens else { _SearchActive = true; + if (SongMenus[htSongMenus(SongMenu)].IsVideoFull()) + SongMenus[htSongMenus(SongMenu)].ToggleVideoFull(); } } break; @@ -229,18 +243,25 @@ 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 (CSongs.NumVisibleSongs > 0) + { StartMedleySong(SongMenus[htSongMenus(SongMenu)].GetSelectedSong()); + } break; + } } } - else + else if(!SongMenus[htSongMenus(SongMenu)].IsVideoFull()) { switch (KeyEvent.Key) { @@ -265,6 +286,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(); @@ -287,106 +315,135 @@ namespace Vocaluxe.Screens } } + if (KeyEvent.Key == Keys.V) + { + if (CSongs.Category != -1) + { + SongMenus[htSongMenus(SongMenu)].ToggleVideoFull(); + } + } + return true; } public override bool HandleMouse(MouseEvent MouseEvent) { - base.HandleMouse(MouseEvent); - - if (Playlists[htPlaylists(Playlist)].Visible && Playlists[htPlaylists(Playlist)].IsMouseOver(MouseEvent)) + if (!SongMenus[htSongMenus(SongMenu)].IsVideoFull()) { - _PlaylistActive = true; - Playlists[htPlaylists(Playlist)].Selected = _PlaylistActive; - SongMenus[htSongMenus(SongMenu)].SetActive(!_PlaylistActive); - } - else if (CHelper.IsInBounds(SongMenus[htSongMenus(SongMenu)].Rect, MouseEvent.X, MouseEvent.Y)) - { - _PlaylistActive = false; - Playlists[htPlaylists(Playlist)].Selected = _PlaylistActive; - SongMenus[htSongMenus(SongMenu)].SetActive(!_PlaylistActive); - } + base.HandleMouse(MouseEvent); - if (Playlists[htPlaylists(Playlist)].Visible && Playlists[htPlaylists(Playlist)].HandleMouse(MouseEvent)) - return true; - - if (!_SongOptionsActive) - { - - if ((MouseEvent.RB) && (CSongs.Category < 0)) + if (Playlists[htPlaylists(Playlist)].Visible && Playlists[htPlaylists(Playlist)].IsMouseOver(MouseEvent)) { - CGraphics.FadeTo(EScreens.ScreenMain); + _PlaylistActive = true; + Playlists[htPlaylists(Playlist)].Selected = _PlaylistActive; + SongMenus[htSongMenus(SongMenu)].SetActive(!_PlaylistActive); } - else if (MouseEvent.RB && _SongOptionsActive) - ToggleSongOptions(ESongOptionsView.None); - - if (MouseEvent.MB && CSongs.Category != -1) + else if (CHelper.IsInBounds(SongMenus[htSongMenus(SongMenu)].Rect, MouseEvent.X, MouseEvent.Y)) { - SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong()); + _PlaylistActive = false; + Playlists[htPlaylists(Playlist)].Selected = _PlaylistActive; + SongMenus[htSongMenus(SongMenu)].SetActive(!_PlaylistActive); } - else - SongMenus[htSongMenus(SongMenu)].HandleMouse(ref MouseEvent); - if (MouseEvent.LB && CSongs.NumVisibleSongs > 0 && SongMenus[htSongMenus(SongMenu)].GetActualSelection() != -1) + if (Playlists[htPlaylists(Playlist)].Visible && Playlists[htPlaylists(Playlist)].HandleMouse(MouseEvent)) + return true; + + if (!_SongOptionsActive) { - if (SongMenus[htSongMenus(SongMenu)].GetSelectedSong() != -1 && !_SongOptionsActive) + + if ((MouseEvent.RB) && (CSongs.Category < 0)) { - ToggleSongOptions(ESongOptionsView.Song); + CGraphics.FadeTo(EScreens.ScreenMain); } - } - else if (MouseEvent.LB && IsMouseOver(MouseEvent)) - { - if (Buttons[htButtons(ButtonOpenOptions)].Selected) - { - ToggleSongOptions(ESongOptionsView.General); - } - } - } - - else - { - if (MouseEvent.LB && IsMouseOver(MouseEvent)) - { - if (Buttons[htButtons(ButtonOptionsClose)].Selected) - { + else if (MouseEvent.RB && _SongOptionsActive) ToggleSongOptions(ESongOptionsView.None); - } - else if (Buttons[htButtons(ButtonOptionsSing)].Selected) + + if (MouseEvent.MB && CSongs.Category != -1) { - ToggleSongOptions(ESongOptionsView.None); - StartSong(SongMenus[htSongMenus(SongMenu)].GetSelectedSong()); + Console.WriteLine("MB pressed"); + SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong()); } - else if (Buttons[htButtons(ButtonOptionsPlaylist)].Selected) + else if (MouseEvent.MB && CSongs.Category == -1) { - OpenAndAddPlaylistAction(); + Console.WriteLine("MB pressed"); + SongMenus[htSongMenus(SongMenu)].SetSelectedCategory(CSongs.GetRandomCategory()); } - else if (Buttons[htButtons(ButtonOptionsRandom)].Selected) + else + SongMenus[htSongMenus(SongMenu)].HandleMouse(ref MouseEvent); + + if (MouseEvent.LB && CSongs.NumVisibleSongs > 0 && SongMenus[htSongMenus(SongMenu)].GetActualSelection() != -1) { - if (CSongs.Category != -1) + if (SongMenus[htSongMenus(SongMenu)].GetSelectedSong() != -1 && !_SongOptionsActive) { - SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong()); + ToggleSongOptions(ESongOptionsView.Song); } } - else if (Buttons[htButtons(ButtonOptionsSingAll)].Selected) + else if (MouseEvent.LB && IsMouseOver(MouseEvent)) { - ToggleSongOptions(ESongOptionsView.None); - StartRandomAllSongs(); - } - else if (Buttons[htButtons(ButtonOptionsSingAllVisible)].Selected) - { - ToggleSongOptions(ESongOptionsView.None); - StartRandomVisibleSongs(); - } - else if (Buttons[htButtons(ButtonOptionsOpenPlaylist)].Selected) - { - OpenPlaylistAction(); + if (Buttons[htButtons(ButtonOpenOptions)].Selected) + { + ToggleSongOptions(ESongOptionsView.General); + } } } - if (MouseEvent.RB) + + else { - ToggleSongOptions(ESongOptionsView.None); + if (MouseEvent.LB && IsMouseOver(MouseEvent)) + { + if (Buttons[htButtons(ButtonOptionsClose)].Selected) + { + ToggleSongOptions(ESongOptionsView.None); + } + else if (Buttons[htButtons(ButtonOptionsSing)].Selected) + { + ToggleSongOptions(ESongOptionsView.None); + StartSong(SongMenus[htSongMenus(SongMenu)].GetSelectedSong()); + } + else if (Buttons[htButtons(ButtonOptionsPlaylist)].Selected) + { + OpenAndAddPlaylistAction(); + } + else if (Buttons[htButtons(ButtonOptionsRandom)].Selected) + { + if (CSongs.Category != -1) + { + 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); + StartRandomAllSongs(); + } + else if (Buttons[htButtons(ButtonOptionsSingAllVisible)].Selected) + { + ToggleSongOptions(ESongOptionsView.None); + StartRandomVisibleSongs(); + } + else if (Buttons[htButtons(ButtonOptionsOpenPlaylist)].Selected) + { + OpenPlaylistAction(); + } + } + if (MouseEvent.RB) + { + ToggleSongOptions(ESongOptionsView.None); + } } } + else + { + if(MouseEvent.RB || MouseEvent.LB) + SongMenus[htSongMenus(SongMenu)].ToggleVideoFull(); + } return true; } @@ -653,6 +710,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; @@ -687,6 +745,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;