added hiding of hidden songs for party mode (not finished and not tested)
This commit is contained in:
1 parent
487ba660a1
commit
e62f18ada6
5 files changed
+66
-7
No files matched your search
@@ -283,6 +283,7 @@ namespace Vocaluxe.PartyModes
|
||||
_Screens.TryGetValue("PartyScreenChallengeMain", out Screen);
|
||||
if (_Screens != null)
|
||||
{
|
||||
_Base.Songs.ResetPartySongSung();
|
||||
GameData.Rounds = new ChallengeRounds(GameData.NumRounds, GameData.NumPlayer, GameData.NumPlayerAtOnce);
|
||||
GameData.CurrentRoundNr = 1;
|
||||
ToScreenMain.CurrentRoundNr = 1;
|
||||
@@ -372,13 +373,11 @@ namespace Vocaluxe.PartyModes
|
||||
if (TeamNr >= _ScreenSongOptions.Selection.NumJokers.Length)
|
||||
return;
|
||||
|
||||
if (_ScreenSongOptions.Selection.RandomOnly)
|
||||
if (!_ScreenSongOptions.Selection.CategoryChangeAllowed)
|
||||
_ScreenSongOptions.Selection.NumJokers[TeamNr]--;
|
||||
|
||||
_ScreenSongOptions.Selection.RandomOnly = true;
|
||||
_ScreenSongOptions.Selection.CategoryChangeAllowed = false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override void SongSelected(int SongID)
|
||||
@@ -420,6 +419,7 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
}
|
||||
|
||||
_Base.Songs.AddPartySongSung(SongID);
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenSing);
|
||||
}
|
||||
|
||||
|
||||
@@ -612,6 +612,21 @@ namespace Vocaluxe.Base
|
||||
return new CCategory(CSongs.Categories[Index]);
|
||||
}
|
||||
|
||||
public void AddPartySongSung(int SongID)
|
||||
{
|
||||
CSongs.AddPartySongSung(SongID);
|
||||
}
|
||||
|
||||
public void ResetPartySongSung()
|
||||
{
|
||||
CSongs.ResetPartySongSung();
|
||||
}
|
||||
|
||||
public void ResetPartySongSung(int CatIndex)
|
||||
{
|
||||
CSongs.ResetPartySongSung(CatIndex);
|
||||
}
|
||||
|
||||
public void NextCategory()
|
||||
{
|
||||
CSongs.NextCategory();
|
||||
|
||||
+43
-3
@@ -21,6 +21,7 @@ namespace Vocaluxe.Base
|
||||
|
||||
public int CatIndex;
|
||||
public bool Visible;
|
||||
public bool PartyHidden;
|
||||
|
||||
public SongPointer(int ID, string sortString)
|
||||
{
|
||||
@@ -28,6 +29,7 @@ namespace Vocaluxe.Base
|
||||
SortString = sortString;
|
||||
CatIndex = -1;
|
||||
Visible = false;
|
||||
PartyHidden = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +133,7 @@ namespace Vocaluxe.Base
|
||||
|
||||
for (int i = 0; i < _SongsSortList.Length; i++)
|
||||
{
|
||||
_SongsSortList[i].Visible = (_SongsSortList[i].CatIndex == _CatIndex);
|
||||
_SongsSortList[i].Visible = (_SongsSortList[i].CatIndex == _CatIndex && !_SongsSortList[i].PartyHidden);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -150,7 +152,7 @@ namespace Vocaluxe.Base
|
||||
int num = 0;
|
||||
for (int i = 0; i < _SongsSortList.Length; i++)
|
||||
{
|
||||
if (_SongsSortList[i].CatIndex == CatIndex)
|
||||
if (_SongsSortList[i].CatIndex == CatIndex && !_SongsSortList[i].PartyHidden)
|
||||
num++;
|
||||
}
|
||||
return num;
|
||||
@@ -219,7 +221,7 @@ namespace Vocaluxe.Base
|
||||
_CoverLoaded = true;
|
||||
}
|
||||
|
||||
public static string GetActualCategoryName()
|
||||
public static string GetCurrentCategoryName()
|
||||
{
|
||||
if ((_Categories.Count > 0) && (_CatIndex >= 0) && (_Categories.Count > _CatIndex))
|
||||
return _Categories[_CatIndex].Name;
|
||||
@@ -237,6 +239,44 @@ namespace Vocaluxe.Base
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void AddPartySongSung(int SongID)
|
||||
{
|
||||
int cat = -1;
|
||||
for (int i = 0; i < _SongsSortList.Length; i++)
|
||||
{
|
||||
if (SongID == _SongsSortList[i].SongID)
|
||||
{
|
||||
_SongsSortList[i].PartyHidden = true;
|
||||
_SongsSortList[i].Visible = false;
|
||||
cat = _SongsSortList[i].CatIndex;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (cat != -1)
|
||||
{
|
||||
if (NumSongsInCategory(cat) == 0)
|
||||
ResetPartySongSung(cat);
|
||||
}
|
||||
}
|
||||
|
||||
public static void ResetPartySongSung()
|
||||
{
|
||||
for (int i = 0; i < _SongsSortList.Length; i++)
|
||||
{
|
||||
_SongsSortList[i].PartyHidden = false;
|
||||
}
|
||||
}
|
||||
|
||||
public static void ResetPartySongSung(int CatIndex)
|
||||
{
|
||||
for (int i = 0; i < _SongsSortList.Length; i++)
|
||||
{
|
||||
if (_SongsSortList[i].CatIndex == CatIndex)
|
||||
_SongsSortList[i].PartyHidden = false;
|
||||
}
|
||||
}
|
||||
|
||||
public static int GetVisibleSongNumber(int SongID)
|
||||
{
|
||||
int i = -1;
|
||||
|
||||
@@ -659,7 +659,7 @@ namespace Vocaluxe.Screens
|
||||
if (SongMenus[htSongMenus(SongMenu)].IsSmallView())
|
||||
CheckPlaylist();
|
||||
|
||||
Texts[htTexts(TextCategory)].Text = CSongs.GetActualCategoryName();
|
||||
Texts[htTexts(TextCategory)].Text = CSongs.GetCurrentCategoryName();
|
||||
|
||||
if (CSongs.Category > -1 || CConfig.Tabs == EOffOn.TR_CONFIG_OFF)
|
||||
CBackgroundMusic.Disabled = true;
|
||||
|
||||
@@ -239,6 +239,10 @@ namespace Vocaluxe.Menu
|
||||
CSong GetSongByID(int SongID);
|
||||
CCategory GetCategory(int Index);
|
||||
|
||||
void AddPartySongSung(int SongID);
|
||||
void ResetPartySongSung();
|
||||
void ResetPartySongSung(int CatIndex);
|
||||
|
||||
void NextCategory();
|
||||
void PrevCategory();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user