PartyNames: Added button for selecting random.
This commit is contained in:
1 parent
949ef022dc
commit
915db881e3
4 files changed
+111
-1
No files matched your search
@@ -503,6 +503,27 @@ namespace VocaluxeLib.Menu
|
||||
}
|
||||
}
|
||||
|
||||
public int GetRandomUnusedProfile()
|
||||
{
|
||||
int id = -1;
|
||||
|
||||
if (_VisibleProfiles.Count == 0)
|
||||
return id;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
private void _PrepareTiles()
|
||||
{
|
||||
_Tiles.Clear();
|
||||
|
||||
Reference in new issue
Block a user