1
0
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:
EXtremeExploit 2023-03-03 16:14:19 -03:00
parent d722e09b2c
commit e23db62386
No known key found for this signature in database
3 changed files with 10 additions and 17 deletions

View File

@ -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();
});
}
}

View File

@ -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)

View File

@ -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