Merge branch 'medley' into develop

This commit is contained in:
Florian Kuepper committed 2012-12-02 20:18:05 +01:00
commit 152b416c1b
11 files changed
+351 -81

No files matched your search

+1
View File
@@ -123,6 +123,7 @@
<TR_SCREENSONG_BUTTON_PLAYLIST>Zur Playlist hinzufügen</TR_SCREENSONG_BUTTON_PLAYLIST>
<TR_SCREENSONG_BUTTON_CANCEL>Schließen</TR_SCREENSONG_BUTTON_CANCEL>
<TR_SCREENSONG_BUTTON_RANDOM>Zufälligen Song wählen</TR_SCREENSONG_BUTTON_RANDOM>
<TR_SCREENSONG_BUTTON_RANDOMCAT>Zufällige Kategorie wählen</TR_SCREENSONG_BUTTON_RANDOMCAT>
<TR_SCREENSONG_BUTTON_SINGALL>Alle Songs singen</TR_SCREENSONG_BUTTON_SINGALL>
<TR_SCREENSONG_BUTTON_SINGALLVISIBLE>Alle sichtbaren Songs singen</TR_SCREENSONG_BUTTON_SINGALLVISIBLE>
<TR_SCREENSONG_BUTTON_OPENPLAYLIST>Playlist öffnen</TR_SCREENSONG_BUTTON_OPENPLAYLIST>
+1
View File
@@ -123,6 +123,7 @@
<TR_SCREENSONG_BUTTON_PLAYLIST>Add to playlist</TR_SCREENSONG_BUTTON_PLAYLIST>
<TR_SCREENSONG_BUTTON_CANCEL>Close</TR_SCREENSONG_BUTTON_CANCEL>
<TR_SCREENSONG_BUTTON_RANDOM>Select a random song</TR_SCREENSONG_BUTTON_RANDOM>
<TR_SCREENSONG_BUTTON_RANDOMCAT>Select a random category</TR_SCREENSONG_BUTTON_RANDOMCAT>
<TR_SCREENSONG_BUTTON_SINGALL>Sing all songs</TR_SCREENSONG_BUTTON_SINGALL>
<TR_SCREENSONG_BUTTON_SINGALLVISIBLE>Sing all visible songs</TR_SCREENSONG_BUTTON_SINGALLVISIBLE>
<TR_SCREENSONG_BUTTON_OPENPLAYLIST>Open playlist</TR_SCREENSONG_BUTTON_OPENPLAYLIST>
@@ -473,6 +473,55 @@
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonOptionsSingAllVisible>
<ButtonOptionsRandomCategory>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Button</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>40</X>
<Y>90</Y>
<Z>-2,11</Z>
<W>360</W>
<H>40</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>180</X>
<Y>5</Y>
<!--<H>: Text height-->
<H>30</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>350</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENSONG_BUTTON_RANDOMCAT</Text>
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonOptionsRandomCategory>
<ButtonOptionsRandom>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
@@ -6,7 +6,7 @@ Version 3:
Add:
<StaticOptionsBG>
<TextOptionsTitle>
<ButtonOptionsSing>, <ButtonOptionsClose>, <ButtonOptionsPlaylist>, <ButtonOptionsSingAll>, <ButtonOptionsSingAllVisible>, <ButtonOptionsRandom>, <ButtonOptionsRandom>, <ButtonOpenOptions>
<ButtonOptionsSing>, <ButtonOptionsClose>, <ButtonOptionsPlaylist>, <ButtonOptionsSingAll>, <ButtonOptionsSingAllVisible>, <ButtonOptionsRandom>, <ButtonOptionsRandom>, <ButtonOptionsRandomCategory>, <ButtonOpenOptions>
<SelectSlideOptionsMode>, <SelectSlideOptionsPlaylistAdd>, <SelectSlideOptionsPlaylistOpen>
and
<Playlist> as a new Screen-Element. For details, look at ScreenSong.xml
+30
View File
@@ -56,6 +56,7 @@ namespace Vocaluxe.Base
private static int _CoverLoadIndex = -1;
private static int _CatIndex = -1;
private static List<CCategory> _Categories = new List<CCategory>();
private static List<CCategory> _CategoriesForRandom = new List<CCategory>();
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(); }
+4
View File
@@ -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
+15
View File
@@ -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
@@ -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()
{
}
+94 -7
View File
@@ -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();
+4
View File
@@ -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);
+132 -73
View File
@@ -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;