Added option to start current song/enter current category
Added CSong.IsInCategory
This commit is contained in:
1 parent
30841c5758
commit
dbb9c6355f
13 files changed
+134
-137
No files matched your search
@@ -79,6 +79,11 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
}
|
||||
}
|
||||
public bool ValueSelected
|
||||
{
|
||||
get { return _Selected && !_ArrowLeftSelected && !_ArrowRightSelected; }
|
||||
}
|
||||
|
||||
public bool Visible = true;
|
||||
public bool Highlighted = false;
|
||||
|
||||
|
||||
@@ -115,6 +115,11 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
_SongMenu.SetSelectedCategory(CategoryNr);
|
||||
}
|
||||
|
||||
public bool EnterCurrentCategory()
|
||||
{
|
||||
return _SongMenu.EnterCurrentCategory();
|
||||
}
|
||||
|
||||
public int GetActualSelection()
|
||||
{
|
||||
return _SongMenu.GetActualSelection();
|
||||
|
||||
@@ -588,6 +588,16 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
LoadTextures();
|
||||
}
|
||||
|
||||
public bool EnterCurrentCategory()
|
||||
{
|
||||
if (!_Initialized)
|
||||
return false;
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() >= 0 || _PreviewSelected < 0 || _PreviewSelected >= CBase.Songs.GetNumCategories())
|
||||
return false;
|
||||
EnterCategory(_PreviewSelected);
|
||||
return true;
|
||||
}
|
||||
|
||||
protected virtual void EnterCategory(int Category)
|
||||
{
|
||||
if (!_Initialized)
|
||||
@@ -605,8 +615,8 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (!_Initialized)
|
||||
return;
|
||||
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() != -1)
|
||||
Reset();
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() == -1)
|
||||
return;
|
||||
|
||||
Reset();
|
||||
CBase.Songs.SetCategory(-1);
|
||||
|
||||
@@ -163,11 +163,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
base.HandleInput(ref KeyEvent, SongOptions);
|
||||
|
||||
if (KeyEvent.KeyPressed)
|
||||
{
|
||||
//
|
||||
}
|
||||
else
|
||||
if (!KeyEvent.KeyPressed)
|
||||
{
|
||||
if (!(KeyEvent.Key == Keys.Left || KeyEvent.Key == Keys.Right || KeyEvent.Key == Keys.Up || KeyEvent.Key == Keys.Down ||
|
||||
KeyEvent.Key == Keys.Escape || KeyEvent.Key == Keys.Back || KeyEvent.Key == Keys.Enter ||
|
||||
|
||||
@@ -29,6 +29,8 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
void SetSelectedCategory(int CategoryNr);
|
||||
int GetActualSelection();
|
||||
|
||||
bool EnterCurrentCategory();
|
||||
|
||||
bool IsSelected();
|
||||
void SetSelected(bool Selected);
|
||||
|
||||
|
||||
Reference in new issue
Block a user