1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 07:32:55 +08:00

Remove available kudosu section from user profile overlay in line with web

This commit is contained in:
Joehu 2021-03-17 13:13:13 -07:00
parent 5a7e416495
commit 6cea74f0fa

View File

@ -23,44 +23,17 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
{ {
this.user.BindTo(user); this.user.BindTo(user);
CountSection total; CountSection total;
CountSection avaliable;
RelativeSizeAxes = Axes.X; RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y; AutoSizeAxes = Axes.Y;
Masking = true; Masking = true;
CornerRadius = 3; CornerRadius = 3;
Children = new Drawable[] Child = total = new CountTotal();
{
new FillFlowContainer this.user.ValueChanged += u => total.Count = u.NewValue?.Kudosu.Total ?? 0;
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Horizontal,
Spacing = new Vector2(5, 0),
Children = new[]
{
total = new CountTotal(),
avaliable = new CountAvailable()
}
}
};
this.user.ValueChanged += u =>
{
total.Count = u.NewValue?.Kudosu.Total ?? 0;
avaliable.Count = u.NewValue?.Kudosu.Available ?? 0;
};
} }
protected override bool OnClick(ClickEvent e) => true; protected override bool OnClick(ClickEvent e) => true;
private class CountAvailable : CountSection
{
public CountAvailable()
: base("Kudosu Avaliable")
{
DescriptionText.Text = "Kudosu can be traded for kudosu stars, which will help your beatmap get more attention. This is the number of kudosu you haven't traded in yet.";
}
}
private class CountTotal : CountSection private class CountTotal : CountSection
{ {
public CountTotal() public CountTotal()
@ -86,7 +59,6 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
public CountSection(string header) public CountSection(string header)
{ {
RelativeSizeAxes = Axes.X; RelativeSizeAxes = Axes.X;
Width = 0.5f;
AutoSizeAxes = Axes.Y; AutoSizeAxes = Axes.Y;
Padding = new MarginPadding { Top = 10, Bottom = 20 }; Padding = new MarginPadding { Top = 10, Bottom = 20 };
Child = new FillFlowContainer Child = new FillFlowContainer