changed mouse interaction in song menu
This commit is contained in:
1 parent
ac2f30450d
commit
74f80bde77
1 file changed
+81
-86
@@ -331,6 +331,7 @@ namespace Vocaluxe.Screens
|
|||||||
_PlaylistActive = true;
|
_PlaylistActive = true;
|
||||||
Playlists[htPlaylists(Playlist)].Selected = _PlaylistActive;
|
Playlists[htPlaylists(Playlist)].Selected = _PlaylistActive;
|
||||||
SongMenus[htSongMenus(SongMenu)].SetActive(!_PlaylistActive);
|
SongMenus[htSongMenus(SongMenu)].SetActive(!_PlaylistActive);
|
||||||
|
ToggleSongOptions(ESongOptionsView.None);
|
||||||
}
|
}
|
||||||
else if (CHelper.IsInBounds(SongMenus[htSongMenus(SongMenu)].Rect, MouseEvent.X, MouseEvent.Y))
|
else if (CHelper.IsInBounds(SongMenus[htSongMenus(SongMenu)].Rect, MouseEvent.X, MouseEvent.Y))
|
||||||
{
|
{
|
||||||
@@ -342,101 +343,95 @@ namespace Vocaluxe.Screens
|
|||||||
if (Playlists[htPlaylists(Playlist)].Visible && Playlists[htPlaylists(Playlist)].HandleMouse(MouseEvent))
|
if (Playlists[htPlaylists(Playlist)].Visible && Playlists[htPlaylists(Playlist)].HandleMouse(MouseEvent))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (!_SongOptionsActive)
|
if ((MouseEvent.RB) && (CSongs.Category < 0))
|
||||||
{
|
{
|
||||||
|
ToggleSongOptions(ESongOptionsView.None);
|
||||||
|
CGraphics.FadeTo(EScreens.ScreenMain);
|
||||||
|
}
|
||||||
|
else if (MouseEvent.RB && _SongOptionsActive)
|
||||||
|
ToggleSongOptions(ESongOptionsView.None);
|
||||||
|
|
||||||
if ((MouseEvent.RB) && (CSongs.Category < 0))
|
if (MouseEvent.MB && CSongs.Category != -1)
|
||||||
{
|
{
|
||||||
CGraphics.FadeTo(EScreens.ScreenMain);
|
ToggleSongOptions(ESongOptionsView.None);
|
||||||
}
|
SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong());
|
||||||
else if (MouseEvent.RB && _SongOptionsActive)
|
}
|
||||||
ToggleSongOptions(ESongOptionsView.None);
|
else if (MouseEvent.MB && CSongs.Category == -1)
|
||||||
|
{
|
||||||
if (MouseEvent.MB && CSongs.Category != -1)
|
ToggleSongOptions(ESongOptionsView.None);
|
||||||
{
|
SongMenus[htSongMenus(SongMenu)].SetSelectedCategory(CSongs.GetRandomCategory());
|
||||||
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);
|
|
||||||
|
|
||||||
if (MouseEvent.LBH && !DragAndDropActive && Playlists[htPlaylists(Playlist)].Visible && CSongs.NumVisibleSongs > 0 && SongMenus[htSongMenus(SongMenu)].GetActualSelection() != -1)
|
|
||||||
{
|
|
||||||
DragAndDropCover = SongMenus[htSongMenus(SongMenu)].GetSelectedSongCover();
|
|
||||||
DragAndDropCover.Rect.Z = CSettings.zNear;
|
|
||||||
Playlists[htPlaylists(Playlist)].DragAndDropSongID = CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetActualSelection()].ID;
|
|
||||||
DragAndDropActive = true;
|
|
||||||
}
|
|
||||||
else if (MouseEvent.LB && CSongs.NumVisibleSongs > 0 && SongMenus[htSongMenus(SongMenu)].GetActualSelection() != -1)
|
|
||||||
{
|
|
||||||
if (SongMenus[htSongMenus(SongMenu)].GetSelectedSong() != -1 && !_SongOptionsActive)
|
|
||||||
{
|
|
||||||
ToggleSongOptions(ESongOptionsView.Song);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (MouseEvent.LB && IsMouseOver(MouseEvent))
|
|
||||||
{
|
|
||||||
if (Buttons[htButtons(ButtonOpenOptions)].Selected)
|
|
||||||
{
|
|
||||||
ToggleSongOptions(ESongOptionsView.General);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
SongMenus[htSongMenus(SongMenu)].HandleMouse(ref MouseEvent);
|
||||||
|
|
||||||
|
if (MouseEvent.LBH && !DragAndDropActive && Playlists[htPlaylists(Playlist)].Visible && CSongs.NumVisibleSongs > 0 && SongMenus[htSongMenus(SongMenu)].GetActualSelection() != -1)
|
||||||
{
|
{
|
||||||
if (MouseEvent.LB && IsMouseOver(MouseEvent))
|
DragAndDropCover = SongMenus[htSongMenus(SongMenu)].GetSelectedSongCover();
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
if (SongMenus[htSongMenus(SongMenu)].GetSelectedSong() != -1 && !_SongOptionsActive)
|
||||||
{
|
{
|
||||||
if (Buttons[htButtons(ButtonOptionsClose)].Selected)
|
ToggleSongOptions(ESongOptionsView.Song);
|
||||||
{
|
|
||||||
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)
|
else
|
||||||
|
ToggleSongOptions(ESongOptionsView.None);
|
||||||
|
}
|
||||||
|
else if (MouseEvent.LB && IsMouseOver(MouseEvent))
|
||||||
|
{
|
||||||
|
if (Buttons[htButtons(ButtonOpenOptions)].Selected)
|
||||||
|
{
|
||||||
|
ToggleSongOptions(ESongOptionsView.General);
|
||||||
|
}else if (Buttons[htButtons(ButtonOptionsClose)].Selected)
|
||||||
{
|
{
|
||||||
ToggleSongOptions(ESongOptionsView.None);
|
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 && _SongOptionsActive)
|
||||||
|
{
|
||||||
|
ToggleSongOptions(ESongOptionsView.None);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!MouseEvent.LBH && DragAndDropActive)
|
if (!MouseEvent.LBH && DragAndDropActive)
|
||||||
@@ -676,7 +671,7 @@ namespace Vocaluxe.Screens
|
|||||||
|
|
||||||
private void ToggleSongOptions(ESongOptionsView view)
|
private void ToggleSongOptions(ESongOptionsView view)
|
||||||
{
|
{
|
||||||
_SongOptionsActive = !_SongOptionsActive;
|
_SongOptionsActive = view != ESongOptionsView.None;
|
||||||
if (_SongOptionsActive)
|
if (_SongOptionsActive)
|
||||||
{
|
{
|
||||||
if (view == ESongOptionsView.Song)
|
if (view == ESongOptionsView.Song)
|
||||||
|
|||||||
Reference in new issue
Block a user