changed mouse interaction in song menu

This commit is contained in:
Alexander Eckart committed 2012-12-03 19:00:10 +01:00
1 parent ac2f30450d
commit 74f80bde77
1 file changed
+11 -16
+11 -16
View File
@@ -331,6 +331,7 @@ namespace Vocaluxe.Screens
_PlaylistActive = true;
Playlists[htPlaylists(Playlist)].Selected = _PlaylistActive;
SongMenus[htSongMenus(SongMenu)].SetActive(!_PlaylistActive);
ToggleSongOptions(ESongOptionsView.None);
}
else if (CHelper.IsInBounds(SongMenus[htSongMenus(SongMenu)].Rect, MouseEvent.X, MouseEvent.Y))
{
@@ -342,11 +343,9 @@ namespace Vocaluxe.Screens
if (Playlists[htPlaylists(Playlist)].Visible && Playlists[htPlaylists(Playlist)].HandleMouse(MouseEvent))
return true;
if (!_SongOptionsActive)
{
if ((MouseEvent.RB) && (CSongs.Category < 0))
{
ToggleSongOptions(ESongOptionsView.None);
CGraphics.FadeTo(EScreens.ScreenMain);
}
else if (MouseEvent.RB && _SongOptionsActive)
@@ -354,12 +353,12 @@ namespace Vocaluxe.Screens
if (MouseEvent.MB && CSongs.Category != -1)
{
Console.WriteLine("MB pressed");
ToggleSongOptions(ESongOptionsView.None);
SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong());
}
else if (MouseEvent.MB && CSongs.Category == -1)
{
Console.WriteLine("MB pressed");
ToggleSongOptions(ESongOptionsView.None);
SongMenus[htSongMenus(SongMenu)].SetSelectedCategory(CSongs.GetRandomCategory());
}
else
@@ -371,6 +370,7 @@ namespace Vocaluxe.Screens
DragAndDropCover.Rect.Z = CSettings.zNear;
Playlists[htPlaylists(Playlist)].DragAndDropSongID = CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetActualSelection()].ID;
DragAndDropActive = true;
ToggleSongOptions(ESongOptionsView.None);
}
else if (MouseEvent.LB && CSongs.NumVisibleSongs > 0 && SongMenus[htSongMenus(SongMenu)].GetActualSelection() != -1)
{
@@ -378,20 +378,15 @@ namespace Vocaluxe.Screens
{
ToggleSongOptions(ESongOptionsView.Song);
}
else
ToggleSongOptions(ESongOptionsView.None);
}
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 (Buttons[htButtons(ButtonOptionsClose)].Selected)
{
ToggleSongOptions(ESongOptionsView.None);
}
@@ -433,11 +428,11 @@ namespace Vocaluxe.Screens
OpenPlaylistAction();
}
}
if (MouseEvent.RB)
if (MouseEvent.RB && _SongOptionsActive)
{
ToggleSongOptions(ESongOptionsView.None);
}
}
if (!MouseEvent.LBH && DragAndDropActive)
{
@@ -676,7 +671,7 @@ namespace Vocaluxe.Screens
private void ToggleSongOptions(ESongOptionsView view)
{
_SongOptionsActive = !_SongOptionsActive;
_SongOptionsActive = view != ESongOptionsView.None;
if (_SongOptionsActive)
{
if (view == ESongOptionsView.Song)