Another fix for name-selection.

This commit is contained in:
Florian Küpper committed 2013-12-23 14:34:55 +01:00
1 parent c5104ee219
commit 3f0509c5af
3 files changed
+10 -4

No files matched your search

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