Fixed double-click-bug on screen-song.
This commit is contained in:
1 parent
81a9486091
commit
6bdfb49cbb
5 files changed
+19
-3
No files matched your search
@@ -449,9 +449,7 @@ namespace Vocaluxe.Screens
|
|||||||
|
|
||||||
if (mouseEvent.LD && !_Sso.Selection.PartyMode)
|
if (mouseEvent.LD && !_Sso.Selection.PartyMode)
|
||||||
{
|
{
|
||||||
//TODO: Causes Bug if you select a song (e.g. with Select random song) and double click a normal button.
|
if (CSongs.NumSongsVisible > 0 && _SongMenus[_SongMenu].GetActualSelection() != -1 && _SongMenus[_SongMenu].IsMouseOverActualSelection(mouseEvent))
|
||||||
//E.g. clicking to fast on Select random song starts the next random song. is this OK?
|
|
||||||
if (CSongs.NumSongsVisible > 0 && _SongMenus[_SongMenu].GetActualSelection() != -1)
|
|
||||||
{
|
{
|
||||||
_ToggleSongOptions(ESongOptionsView.None);
|
_ToggleSongOptions(ESongOptionsView.None);
|
||||||
_StartVisibleSong(_SongMenus[_SongMenu].GetActualSelection());
|
_StartVisibleSong(_SongMenus[_SongMenu].GetActualSelection());
|
||||||
|
|||||||
@@ -98,6 +98,11 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
_SongMenu.SetActive(active);
|
_SongMenu.SetActive(active);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool IsMouseOverActualSelection(SMouseEvent mEvent)
|
||||||
|
{
|
||||||
|
return _SongMenu.IsMouseOverActualSelection(mEvent);
|
||||||
|
}
|
||||||
|
|
||||||
public int GetSelectedSong()
|
public int GetSelectedSong()
|
||||||
{
|
{
|
||||||
return _SongMenu.GetSelectedSong();
|
return _SongMenu.GetSelectedSong();
|
||||||
|
|||||||
@@ -518,6 +518,8 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
_Active = active;
|
_Active = active;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual bool IsMouseOverActualSelection(SMouseEvent mEvent) { return false; }
|
||||||
|
|
||||||
public virtual int GetSelectedSong()
|
public virtual int GetSelectedSong()
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@@ -485,6 +485,15 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
return _Locked;
|
return _Locked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool IsMouseOverActualSelection(SMouseEvent mEvent)
|
||||||
|
{
|
||||||
|
CStatic selCov = GetSelectedSongCover();
|
||||||
|
if (selCov.Texture == null)
|
||||||
|
return false;
|
||||||
|
SRectF rect = new SRectF(selCov.Rect.X - selCov.Rect.W*0.2f, selCov.Rect.Y - selCov.Rect.H*0.2f, selCov.Rect.W*1.2f, selCov.Rect.H*1.2f, selCov.Rect.Z);
|
||||||
|
return CHelper.IsInBounds(rect, mEvent);
|
||||||
|
}
|
||||||
|
|
||||||
public override CStatic GetSelectedSongCover()
|
public override CStatic GetSelectedSongCover()
|
||||||
{
|
{
|
||||||
foreach (CStatic tile in _Tiles)
|
foreach (CStatic tile in _Tiles)
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
bool IsActive();
|
bool IsActive();
|
||||||
void SetActive(bool active);
|
void SetActive(bool active);
|
||||||
|
|
||||||
|
bool IsMouseOverActualSelection(SMouseEvent mEvent);
|
||||||
|
|
||||||
int GetSelectedCategory();
|
int GetSelectedCategory();
|
||||||
void SetSelectedCategory(int categoryNr);
|
void SetSelectedCategory(int categoryNr);
|
||||||
int GetActualSelection();
|
int GetActualSelection();
|
||||||
|
|||||||
Reference in new issue
Block a user