mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 05:02:55 +08:00
Remove available kudosu section from user profile overlay in line with web
This commit is contained in:
parent
5a7e416495
commit
6cea74f0fa
@ -23,44 +23,17 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
|
||||
{
|
||||
this.user.BindTo(user);
|
||||
CountSection total;
|
||||
CountSection avaliable;
|
||||
RelativeSizeAxes = Axes.X;
|
||||
AutoSizeAxes = Axes.Y;
|
||||
Masking = true;
|
||||
CornerRadius = 3;
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new FillFlowContainer
|
||||
{
|
||||
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;
|
||||
};
|
||||
Child = total = new CountTotal();
|
||||
|
||||
this.user.ValueChanged += u => total.Count = u.NewValue?.Kudosu.Total ?? 0;
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
public CountTotal()
|
||||
@ -86,7 +59,6 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
|
||||
public CountSection(string header)
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
Width = 0.5f;
|
||||
AutoSizeAxes = Axes.Y;
|
||||
Padding = new MarginPadding { Top = 10, Bottom = 20 };
|
||||
Child = new FillFlowContainer
|
||||
|
Loading…
Reference in New Issue
Block a user