changed challenge party mode song selection (there are still some bugs)

This commit is contained in:
Alexander Eckart committed 2012-12-23 12:36:50 +01:00
1 parent e843569b3e
commit ee69919366
9 files changed
+220 -81

No files matched your search

+2
View File
@@ -371,6 +371,7 @@ namespace Vocaluxe.Menu
public struct MouseEvent
{
public ESender Sender;
public bool Handled;
public int X;
public int Y;
public bool LB; //left button click
@@ -392,6 +393,7 @@ namespace Vocaluxe.Menu
public MouseEvent(ESender sender, bool alt, bool shift, bool ctrl, int x, int y, bool lb, bool ld, bool rb, int wheel, bool lbh, bool rbh, bool mb, bool mbh)
{
Sender = sender;
Handled = false;
X = x;
Y = y;
LB = lb;
@@ -599,6 +599,7 @@ namespace Vocaluxe.Menu.SongMenu
if (Category >= _Base.Songs.GetNumCategories())
return;
Reset();
_Base.Songs.SetCategory(Category);
}
@@ -610,6 +611,7 @@ namespace Vocaluxe.Menu.SongMenu
if (_Base.Songs.GetCurrentCategoryIndex() != -1)
Reset();
Reset();
_Base.Songs.SetCategory(-1);
}
@@ -105,6 +105,8 @@ namespace Vocaluxe.Menu.SongMenu
{
base.Update(SongOptions);
UpdateList(_Offset);
if (SongOptions.Selection.RandomOnly)
{
_Locked = _PreviewSelected;
@@ -382,6 +384,7 @@ namespace Vocaluxe.Menu.SongMenu
if ((MouseEvent.RB) && (_Base.Songs.GetNumCategories() > 0) && _Base.Songs.GetCurrentCategoryIndex() >= 0 && _Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
{
ShowCategories();
MouseEvent.Handled = true;
return;
}
else if (MouseEvent.RB && _Base.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF && !SongOptions.Selection.PartyMode)
@@ -402,6 +405,7 @@ namespace Vocaluxe.Menu.SongMenu
if ((tile.Texture.index != _CoverTexture.index) && CHelper.IsInBounds(tile.Rect, MouseEvent))
{
EnterCategory(_PreviewSelected);
MouseEvent.Handled = true;
return;
}
}
@@ -662,6 +666,7 @@ namespace Vocaluxe.Menu.SongMenu
_Locked = -1;
_actualSelection = 0;
AfterCategoryChange();
_Locked = 0;
}
protected override void ShowCategories()
@@ -672,16 +677,15 @@ namespace Vocaluxe.Menu.SongMenu
_Locked = -1;
_actualSelection = 0;
AfterCategoryChange();
_Locked = 0;
}
private void NextCategory()
{
if (_Base.Songs.GetCurrentCategoryIndex() > -1)
{
Reset();
_Base.Songs.NextCategory();
EnterCategory(_Base.Songs.GetCurrentCategoryIndex());
_Locked = 0;
}
}
@@ -689,10 +693,8 @@ namespace Vocaluxe.Menu.SongMenu
{
if (_Base.Songs.GetCurrentCategoryIndex() > -1)
{
Reset();
_Base.Songs.PrevCategory();
EnterCategory(_Base.Songs.GetCurrentCategoryIndex());
_Locked = 0;
}
}
@@ -827,7 +829,6 @@ namespace Vocaluxe.Menu.SongMenu
}
UpdateList(_Offset);
}
public override bool IsSmallView()
+8
View File
@@ -67,6 +67,14 @@ namespace Vocaluxe.PartyModes
return new ScreenSongOptions();
}
public virtual void OnSongChange(int SongIndex, ref ScreenSongOptions ScreenSongOptions)
{
}
public virtual void OnCategoryChange(int CategoryIndex, ref ScreenSongOptions ScreenSongOptions)
{
}
public virtual int GetMaxPlayer()
{
return 6;
+1
View File
@@ -16,6 +16,7 @@ namespace Vocaluxe.PartyModes
_ScreenSongOptions.Selection.CategoryChangeAllowed = true;
_ScreenSongOptions.Selection.NumJokers = null;
_ScreenSongOptions.Selection.TeamNames = null;
_ScreenSongOptions.Selection.SongIndex = -1;
_ScreenSongOptions.Sorting.SearchString = String.Empty;
_ScreenSongOptions.Sorting.SearchStringVisible = false;
+13
View File
@@ -28,6 +28,16 @@ namespace Vocaluxe.PartyModes
/// </summary>
public struct SelectionOptions
{
/// <summary>
/// If != -1, the SongMenu should set the song selection on the provided song index (visible index) if possible
/// </summary>
public int SongIndex;
/// <summary>
/// If true, the SongMenu should perform the select random song method
/// </summary>
public bool SelectNextRandomSong;
/// <summary>
/// Choosing song only by random
/// </summary>
@@ -69,6 +79,9 @@ namespace Vocaluxe.PartyModes
EScreens GetMainScreen();
ScreenSongOptions GetScreenSongOptions();
void OnSongChange(int SongIndex, ref ScreenSongOptions ScreenSongOptions);
void OnCategoryChange(int CategoryIndex, ref ScreenSongOptions ScreenSongOptions);
int GetMaxPlayer();
int GetMinPlayer();
int GetMaxTeams();