Another fix for name-selection.

This commit is contained in:
Florian Küpper committed 2013-12-26 13:07:22 +01:00
1 parent 774fd7f7a5
commit f5407f1815
3 files changed
+10 -4

No files matched your search

+1 -1
View File
@@ -456,7 +456,7 @@ namespace Vocaluxe.Base
if (!IsProfileIDValid(profileID))
return true; // this will prevent from saving dummy profiles to highscore db
return !_Profiles[profileID].UserRole.HasFlag(EUserRole.TR_USERROLE_NORMAL);
return _Profiles[profileID].UserRole <= EUserRole.TR_USERROLE_GUEST;
}
public static bool IsActive(int profileID)
+1 -1
View File
@@ -620,7 +620,7 @@ namespace Vocaluxe.Screens
else
_SelectSlides[_SelectSlideDuetPlayer[i]].Visible = false;
}
_NameSelections[_NameSelection].UpdateList();
_ProfilesChanged = false;
_AvatarsChanged = false;
}
+8 -2
View File
@@ -488,13 +488,19 @@ namespace VocaluxeLib.Menu
{
if(id > -1)
if (!_UsedProfiles.Contains(id) && CBase.Profiles.IsProfileIDValid(id) && !CBase.Profiles.IsGuest(id))
{
_UsedProfiles.Add(id);
_UpdateVisibleProfiles();
}
}
public void RemoveUsedProfile(int id)
{
if(id > -1)
if (id > -1)
{
_UsedProfiles.Remove(id);
_UpdateVisibleProfiles();
}
}
private void _PrepareTiles()
@@ -523,7 +529,7 @@ namespace VocaluxeLib.Menu
bool visible = profile.Active == EOffOn.TR_CONFIG_ON;
if (visible)
{
if (_UsedProfiles.Contains(profile.ID) && !profile.UserRole.HasFlag(EUserRole.TR_USERROLE_NORMAL))
if (_UsedProfiles.Contains(profile.ID) && ((int)profile.UserRole) >= ((int)EUserRole.TR_USERROLE_NORMAL))
visible = false;
}
if (visible)