mirror of
https://github.com/ppy/osu.git
synced 2025-03-14 05:07:26 +08:00
Do list group'badges in a nicer way
This commit is contained in:
parent
d722e09b2c
commit
e23db62386
@ -25,12 +25,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
||||
Clear(true);
|
||||
|
||||
if (user.NewValue?.Groups != null)
|
||||
{
|
||||
AddRange(user.NewValue.Groups.Select(g => new GroupBadge(g)));
|
||||
Show();
|
||||
}
|
||||
else
|
||||
Hide();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -98,13 +98,6 @@ namespace osu.Game.Users
|
||||
return statusContainer;
|
||||
}
|
||||
|
||||
protected FillFlowContainer CreateGroupBadges()
|
||||
{
|
||||
var groupBadgeFlow = new GroupBadgeFlow();
|
||||
groupBadgeFlow.User.Value = User;
|
||||
return groupBadgeFlow;
|
||||
}
|
||||
|
||||
private void displayStatus(UserStatus status, UserActivity activity = null)
|
||||
{
|
||||
if (status != null)
|
||||
|
@ -68,11 +68,6 @@ namespace osu.Game.Users
|
||||
username.Anchor = Anchor.CentreLeft;
|
||||
username.Origin = Anchor.CentreLeft;
|
||||
}),
|
||||
CreateGroupBadges().With(badges =>
|
||||
{
|
||||
badges.Anchor = Anchor.CentreLeft;
|
||||
badges.Origin = Anchor.CentreLeft;
|
||||
})
|
||||
}
|
||||
},
|
||||
new FillFlowContainer
|
||||
@ -100,6 +95,16 @@ namespace osu.Game.Users
|
||||
}
|
||||
};
|
||||
|
||||
if (User.Groups != null)
|
||||
{
|
||||
details.Add(new GroupBadgeFlow
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
User = { Value = User }
|
||||
});
|
||||
}
|
||||
|
||||
if (User.IsSupporter)
|
||||
{
|
||||
details.Add(new SupporterIcon
|
||||
|
Loading…
x
Reference in New Issue
Block a user