From d5c39ceb1af8617e358bc943534d9b0c6d116a32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20K=C3=BCpper?= Date: Sun, 21 Dec 2014 13:00:57 +0100 Subject: [PATCH] Fix double-click for starting song. --- VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs | 2 +- VocaluxeLib/Menu/SongMenu/CSongMenuList.cs | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs b/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs index ec8d59cb..b1f5eed0 100644 --- a/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs +++ b/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs @@ -299,7 +299,7 @@ namespace VocaluxeLib.Menu.SongMenu CBase.Drawing.DrawTexture(CBase.BackgroundMusic.GetVideoTexture(), new SRectF(0, 0, 1280, 720, 0)); } - public bool IsMouseOverSelectedSong(SMouseEvent mEvent) + public virtual bool IsMouseOverSelectedSong(SMouseEvent mEvent) { CStatic selCov = GetSelectedSongCover(); return selCov != null && CHelper.IsInBounds(selCov.Rect.Scale(SelectedTileZoomFactor), mEvent); diff --git a/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs b/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs index c88f2d25..7b52be5b 100644 --- a/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs +++ b/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs @@ -530,6 +530,17 @@ namespace VocaluxeLib.Menu.SongMenu return _Tiles.FirstOrDefault(tile => tile.Selected); } + public override bool IsMouseOverSelectedSong(SMouseEvent mEvent) + { + for (int i = 0; i < _Tiles.Count; i++) + { + if (!_Tiles[i].Selected) + continue; + return CHelper.IsInBounds(_Tiles[i].Rect, mEvent) || CHelper.IsInBounds(_Texts[i].Rect, mEvent); + } + return false; + } + protected override void _EnterCategory(int categoryNr) { base._EnterCategory(categoryNr);