Merge remote-tracking branch 'refs/remotes/Vocaluxe/develop' into More-Customisable-Notes
This commit is contained in:
commit
7ab90dbaa5
74 files changed
+904
-448
No files matched your search
@@ -618,6 +618,7 @@ namespace VocaluxeLib.Menu
|
||||
_UpdatePlayerSlide();
|
||||
}
|
||||
_UpdateButtonState();
|
||||
_UpdateNextButtonVisibility();
|
||||
}
|
||||
|
||||
public void DecreasePlayerNum(int team)
|
||||
@@ -633,6 +634,7 @@ namespace VocaluxeLib.Menu
|
||||
_UpdatePlayerSlide();
|
||||
}
|
||||
_UpdateButtonState();
|
||||
_UpdateNextButtonVisibility();
|
||||
}
|
||||
|
||||
#region private methods
|
||||
@@ -725,7 +727,7 @@ namespace VocaluxeLib.Menu
|
||||
{
|
||||
if (_NumPlayerTeams[team] == _TeamList[team].Count && !_ChangePlayerNumDynamic)
|
||||
return;
|
||||
if (_NumPlayerTeams[team] == _PartyMode.MaxPlayersPerTeam)
|
||||
if (_NumPlayerTeams[team] > _PartyMode.MaxPlayersPerTeam)
|
||||
return;
|
||||
|
||||
_NameSelections[_NameSelection].UseProfile(profileID);
|
||||
@@ -774,7 +776,8 @@ namespace VocaluxeLib.Menu
|
||||
for (int p = 0; p < _NumPlayerTeams[t]; p++)
|
||||
{
|
||||
int profileID = _NameSelections[_NameSelection].GetRandomUnusedProfile();
|
||||
_AddPlayer(t, profileID);
|
||||
if(profileID >= 0) //only add valid profiles
|
||||
_AddPlayer(t, profileID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -465,23 +465,11 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public int GetRandomUnusedProfile()
|
||||
{
|
||||
int id = -1;
|
||||
|
||||
if (_VisibleProfiles.Count == 0)
|
||||
return id;
|
||||
return -1;
|
||||
|
||||
if (_VisibleProfiles.Count == _UsedProfiles.Count)
|
||||
return id;
|
||||
|
||||
while (id == -1)
|
||||
{
|
||||
int rand = CBase.Game.GetRandom(_VisibleProfiles.Count);
|
||||
if (_UsedProfiles.Contains(_VisibleProfiles[rand]))
|
||||
continue;
|
||||
id = _VisibleProfiles[rand];
|
||||
}
|
||||
|
||||
return id;
|
||||
int rand = CBase.Game.GetRandom(_VisibleProfiles.Count);
|
||||
return _VisibleProfiles[rand];
|
||||
}
|
||||
|
||||
private void _PrepareTiles()
|
||||
|
||||
@@ -1087,6 +1087,7 @@ namespace VocaluxeLib.Menu
|
||||
};
|
||||
_PlaylistElementContents.Add(pec);
|
||||
}
|
||||
_SetSelectionToFirstEntry();
|
||||
_Update();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -436,6 +436,22 @@ namespace VocaluxeLib.Menu
|
||||
AddValue(value);
|
||||
}
|
||||
|
||||
public void AddValues(IEnumerable<string> values, IEnumerable<int> tags)
|
||||
{
|
||||
using (var e1 = values.GetEnumerator())
|
||||
using (var e2 = tags.GetEnumerator())
|
||||
{
|
||||
while (e1.MoveNext() && e2.MoveNext())
|
||||
{
|
||||
AddValue(e1.Current, tag: e2.Current);
|
||||
}
|
||||
if (e1.MoveNext() || e2.MoveNext())
|
||||
{
|
||||
throw new ArgumentException("the lists must have the same length");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void AddValues(string[] values, CTextureRef[] textures)
|
||||
{
|
||||
Debug.Assert(values.Length == textures.Length);
|
||||
@@ -566,10 +582,10 @@ namespace VocaluxeLib.Menu
|
||||
for (int i = 0; i < numvis; i++)
|
||||
{
|
||||
var el = new CElement
|
||||
{
|
||||
Text = new CText(0, 0, 0, _TextH, _MaxW, EAlignment.Center, _Theme.TextStyle, _Theme.TextFont, _TextColor, "T", _PartyModeID),
|
||||
Img = new CStatic(_PartyModeID)
|
||||
};
|
||||
{
|
||||
Text = new CText(0, 0, 0, _TextH, _MaxW, EAlignment.Center, _Theme.TextStyle, _Theme.TextFont, _TextColor, "T", _PartyModeID),
|
||||
Img = new CStatic(_PartyModeID)
|
||||
};
|
||||
_VisibleElements.Add(el);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user