fixed song navigation in party mode

This commit is contained in:
Alexander Eckart committed 2012-12-17 23:48:05 +01:00
1 parent 0d8934dea8
commit 7202cf5616
5 files changed
+27 -9

No files matched your search

+7 -4
View File
@@ -654,7 +654,7 @@ namespace Vocaluxe.Screens
if (_sso.Selection.PartyMode) if (_sso.Selection.PartyMode)
ToggleSongOptions(ESongOptionsView.None); ToggleSongOptions(ESongOptionsView.None);
SongMenus[htSongMenus(SongMenu)].Update(); SongMenus[htSongMenus(SongMenu)].Update(_sso);
if (SongMenus[htSongMenus(SongMenu)].IsSmallView()) if (SongMenus[htSongMenus(SongMenu)].IsSmallView())
CheckPlaylist(); CheckPlaylist();
@@ -697,7 +697,10 @@ namespace Vocaluxe.Screens
if (_sso.Selection.RandomOnly && _sso.Selection.NumJokers != null) if (_sso.Selection.RandomOnly && _sso.Selection.NumJokers != null)
{ {
Buttons[htButtons(ButtonStart)].Visible = true; Buttons[htButtons(ButtonStart)].Visible = true;
SongMenus[htSongMenus(SongMenu)].SetSmallView(true);
if(!SongMenus[htSongMenus(SongMenu)].IsSmallView())
SongMenus[htSongMenus(SongMenu)].SetSmallView(true);
for (int i = 0; i < _Base.Settings.GetMaxNumPlayer(); i++) for (int i = 0; i < _Base.Settings.GetMaxNumPlayer(); i++)
{ {
if (i < _sso.Selection.NumJokers.Length) if (i < _sso.Selection.NumJokers.Length)
@@ -1073,7 +1076,7 @@ namespace Vocaluxe.Screens
Buttons[htButtons(ButtonOptionsSingAll)].Visible = false; Buttons[htButtons(ButtonOptionsSingAll)].Visible = false;
Buttons[htButtons(ButtonOptionsSingAllVisible)].Visible = false; Buttons[htButtons(ButtonOptionsSingAllVisible)].Visible = false;
Buttons[htButtons(ButtonOptionsOpenPlaylist)].Visible = false; Buttons[htButtons(ButtonOptionsOpenPlaylist)].Visible = false;
Buttons[htButtons(ButtonOpenOptions)].Visible = true; Buttons[htButtons(ButtonOpenOptions)].Visible = false;
Texts[htTexts(TextOptionsTitle)].Visible = false; Texts[htTexts(TextOptionsTitle)].Visible = false;
Statics[htStatics(StaticOptionsBG)].Visible = false; Statics[htStatics(StaticOptionsBG)].Visible = false;
} }
@@ -1082,7 +1085,7 @@ namespace Vocaluxe.Screens
#region Playlist Actions #region Playlist Actions
public void CheckPlaylist() public void CheckPlaylist()
{ {
if (Playlists[htPlaylists(Playlist)].ActivePlaylistID == -1) if (Playlists[htPlaylists(Playlist)].ActivePlaylistID == -1 && _PlaylistActive)
ClosePlaylist(); ClosePlaylist();
} }
+2 -2
View File
@@ -48,9 +48,9 @@ namespace Vocaluxe.Menu.SongMenu
} }
#region ISongMenu #region ISongMenu
public void Update() public void Update(ScreenSongOptions SongOptions)
{ {
_SongMenu.Update(); _SongMenu.Update(SongOptions);
} }
public void OnShow() public void OnShow()
@@ -434,7 +434,7 @@ namespace Vocaluxe.Menu.SongMenu
Init(); Init();
} }
public virtual void Update() public virtual void Update(ScreenSongOptions SongOptions)
{ {
if (!_Initialized) if (!_Initialized)
return; return;
@@ -101,6 +101,21 @@ namespace Vocaluxe.Menu.SongMenu
_SongLength = _Theme.songMenuTileBoard.TextSongLength; _SongLength = _Theme.songMenuTileBoard.TextSongLength;
} }
public override void Update(ScreenSongOptions SongOptions)
{
base.Update(SongOptions);
if (SongOptions.Selection.RandomOnly)
{
_Locked = _PreviewSelected;
_actualSelection = _PreviewSelected;
for (int i = 0; i < _Tiles.Count; i++)
{
_Tiles[i].Selected = _Locked == i + _Offset;
}
}
}
public override void OnShow() public override void OnShow()
{ {
if (_Base.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF && _Base.Songs.GetNumCategories() > 0 && _Base.Songs.GetCurrentCategoryIndex() == -1) if (_Base.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF && _Base.Songs.GetNumCategories() > 0 && _Base.Songs.GetCurrentCategoryIndex() == -1)
@@ -172,7 +187,7 @@ namespace Vocaluxe.Menu.SongMenu
} }
if ((_Locked == -1 || !sel) && if ((_Locked == -1 || !sel) &&
KeyEvent.Key != Keys.Escape && KeyEvent.Key != Keys.Back && KeyEvent.Key != Keys.PageUp && KeyEvent.Key != Keys.PageDown) (KeyEvent.Key != Keys.Escape && KeyEvent.Key != Keys.Back && KeyEvent.Key != Keys.PageUp && KeyEvent.Key != Keys.PageDown))
{ {
if (_PreviewSelected > -1) if (_PreviewSelected > -1)
{ {
+1 -1
View File
@@ -8,7 +8,7 @@ namespace Vocaluxe.Menu.SongMenu
{ {
interface ISongMenu : IMenuElement interface ISongMenu : IMenuElement
{ {
void Update(); void Update(ScreenSongOptions SongOptions);
void OnShow(); void OnShow();
void OnHide(); void OnHide();