Revert "Revert PartyNames-changes on develop-branch."
This reverts commit 43545ac47f.
Conflicts:
VocaluxeLib/Menu/CNameSelection.cs
This commit is contained in:
1 parent
6009826e02
commit
77f2e17d47
24 files changed
+1351
-1112
No files matched your search
@@ -71,6 +71,10 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
private CTexture _TextureEmptyTile;
|
||||
private CTexture _TextureTileSelected;
|
||||
public CTexture TextureEmptyTile
|
||||
{
|
||||
get { return _TextureEmptyTile; }
|
||||
}
|
||||
|
||||
public SColorF ColorEmptyTile;
|
||||
|
||||
@@ -90,6 +94,7 @@ namespace VocaluxeLib.Menu
|
||||
private int _Player = -1;
|
||||
|
||||
private readonly List<int> _VisibleProfiles;
|
||||
private List<int> _UsedProfiles;
|
||||
|
||||
private CStatic _PlayerSelector;
|
||||
|
||||
@@ -100,6 +105,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
_Tiles = new List<CTile>();
|
||||
_VisibleProfiles = new List<int>();
|
||||
_UsedProfiles = new List<int>();
|
||||
}
|
||||
|
||||
public void Init()
|
||||
@@ -478,6 +484,19 @@ namespace VocaluxeLib.Menu
|
||||
_PrepareTiles();
|
||||
}
|
||||
|
||||
public void UseProfile(int id)
|
||||
{
|
||||
if(id > -1)
|
||||
if (!_UsedProfiles.Contains(id) && CBase.Profiles.IsProfileIDValid(id) && !CBase.Profiles.IsGuest(id))
|
||||
_UsedProfiles.Add(id);
|
||||
}
|
||||
|
||||
public void RemoveUsedProfile(int id)
|
||||
{
|
||||
if(id > -1)
|
||||
_UsedProfiles.Remove(id);
|
||||
}
|
||||
|
||||
private void _PrepareTiles()
|
||||
{
|
||||
_Tiles.Clear();
|
||||
@@ -504,14 +523,8 @@ namespace VocaluxeLib.Menu
|
||||
bool visible = profile.Active == EOffOn.TR_CONFIG_ON;
|
||||
if (visible)
|
||||
{
|
||||
//Show profile only if active
|
||||
for (int p = 0; p < CBase.Game.GetNumPlayer(); p++)
|
||||
{
|
||||
//Don't show profile if is selected, but if selected and guest
|
||||
if (CBase.Game.GetPlayers()[p].ProfileID == profile.ID
|
||||
&& !profile.UserRole.HasFlag(EUserRole.TR_USERROLE_NORMAL))
|
||||
visible = false;
|
||||
}
|
||||
if (_UsedProfiles.Contains(profile.ID) && !profile.UserRole.HasFlag(EUserRole.TR_USERROLE_NORMAL))
|
||||
visible = false;
|
||||
}
|
||||
if (visible)
|
||||
_VisibleProfiles.Add(profile.ID);
|
||||
|
||||
Reference in new issue
Block a user