mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 02:46:43 +08:00
Small cleanups
This commit is contained in:
parent
138e65d7a4
commit
febe0175cd
@ -60,28 +60,14 @@ namespace osu.Game.Overlays.Rankings.Tables
|
||||
new ColoredText
|
||||
{
|
||||
Text = $@"{item.ActiveUsers:N0}",
|
||||
Font = OsuFont.GetFont(size: TEXT_SIZE),
|
||||
},
|
||||
new ColoredMetricNumber(item.PlayCount)
|
||||
{
|
||||
Font = OsuFont.GetFont(size: TEXT_SIZE),
|
||||
},
|
||||
new ColoredMetricNumber(item.RankedScore)
|
||||
{
|
||||
Font = OsuFont.GetFont(size: TEXT_SIZE),
|
||||
},
|
||||
new ColoredMetricNumber(item.RankedScore / Math.Max(item.ActiveUsers, 1))
|
||||
{
|
||||
Font = OsuFont.GetFont(size: TEXT_SIZE),
|
||||
},
|
||||
new MetricNumber(item.Performance)
|
||||
{
|
||||
Font = OsuFont.GetFont(size: TEXT_SIZE),
|
||||
},
|
||||
new ColoredMetricNumber(item.PlayCount),
|
||||
new ColoredMetricNumber(item.RankedScore),
|
||||
new ColoredMetricNumber(item.RankedScore / Math.Max(item.ActiveUsers, 1)),
|
||||
new MetricNumber(item.Performance),
|
||||
new ColoredText
|
||||
{
|
||||
Text = $@"{item.Performance / Math.Max(item.ActiveUsers, 1):N0}",
|
||||
Font = OsuFont.GetFont(size: TEXT_SIZE),
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -46,33 +46,30 @@ namespace osu.Game.Overlays.Rankings.Tables
|
||||
var username = new LinkFlowContainer(t => t.Font = OsuFont.GetFont(size: TEXT_SIZE)) { AutoSizeAxes = Axes.Both };
|
||||
username.AddUserLink(item.User);
|
||||
|
||||
content.Add(new FillFlowContainer
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Horizontal,
|
||||
Spacing = new Vector2(7, 0),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new UpdateableFlag(item.User.Country)
|
||||
{
|
||||
Size = new Vector2(20, 13),
|
||||
ShowPlaceholderOnNull = false,
|
||||
},
|
||||
username
|
||||
}
|
||||
});
|
||||
|
||||
content.AddRange(new Drawable[]
|
||||
{
|
||||
new FillFlowContainer
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Horizontal,
|
||||
Spacing = new Vector2(7, 0),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new UpdateableFlag(item.User.Country)
|
||||
{
|
||||
Size = new Vector2(20, 13),
|
||||
ShowPlaceholderOnNull = false,
|
||||
},
|
||||
username
|
||||
}
|
||||
},
|
||||
new ColoredText
|
||||
{
|
||||
Text = $@"{item.Accuracy:F2}%",
|
||||
Font = OsuFont.GetFont(size: TEXT_SIZE),
|
||||
},
|
||||
new ColoredText
|
||||
{
|
||||
Text = $@"{item.PlayCount:N0}",
|
||||
Font = OsuFont.GetFont(size: TEXT_SIZE),
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
@ -82,17 +79,14 @@ namespace osu.Game.Overlays.Rankings.Tables
|
||||
new ColoredText
|
||||
{
|
||||
Text = $@"{item.GradesCount.SS + item.GradesCount.SSPlus:N0}",
|
||||
Font = OsuFont.GetFont(size: TEXT_SIZE),
|
||||
},
|
||||
new ColoredText
|
||||
{
|
||||
Text = $@"{item.GradesCount.S + item.GradesCount.SPlus:N0}",
|
||||
Font = OsuFont.GetFont(size: TEXT_SIZE),
|
||||
},
|
||||
new ColoredText
|
||||
{
|
||||
Text = $@"{item.GradesCount.A:N0}",
|
||||
Font = OsuFont.GetFont(size: TEXT_SIZE),
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -99,6 +99,7 @@ namespace osu.Game.Overlays.Rankings.Tables
|
||||
this.value = value;
|
||||
|
||||
Text = HumanizerUtils.ToReadableString(value);
|
||||
Font = OsuFont.GetFont(size: TEXT_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -118,6 +119,11 @@ namespace osu.Game.Overlays.Rankings.Tables
|
||||
|
||||
protected class ColoredText : OsuSpriteText
|
||||
{
|
||||
public ColoredText()
|
||||
{
|
||||
Font = OsuFont.GetFont(size: TEXT_SIZE);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
|
@ -47,56 +47,44 @@ namespace osu.Game.Overlays.Rankings.Tables
|
||||
var username = new LinkFlowContainer(t => t.Font = OsuFont.GetFont(size: TEXT_SIZE)) { AutoSizeAxes = Axes.Both };
|
||||
username.AddUserLink(item.User);
|
||||
|
||||
content.Add(new FillFlowContainer
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Horizontal,
|
||||
Spacing = new Vector2(7, 0),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new UpdateableFlag(item.User.Country)
|
||||
{
|
||||
Size = new Vector2(20, 13),
|
||||
ShowPlaceholderOnNull = false,
|
||||
},
|
||||
username
|
||||
}
|
||||
});
|
||||
|
||||
content.AddRange(new Drawable[]
|
||||
{
|
||||
new FillFlowContainer
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Horizontal,
|
||||
Spacing = new Vector2(7, 0),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new UpdateableFlag(item.User.Country)
|
||||
{
|
||||
Size = new Vector2(20, 13),
|
||||
ShowPlaceholderOnNull = false,
|
||||
},
|
||||
username
|
||||
}
|
||||
},
|
||||
new ColoredText
|
||||
{
|
||||
Text = $@"{item.Accuracy:F2}%",
|
||||
Font = OsuFont.GetFont(size: TEXT_SIZE),
|
||||
},
|
||||
new ColoredText
|
||||
{
|
||||
Text = $@"{item.PlayCount:N0}",
|
||||
Font = OsuFont.GetFont(size: TEXT_SIZE),
|
||||
},
|
||||
new ColoredMetricNumber(item.TotalScore)
|
||||
{
|
||||
Font = OsuFont.GetFont(size: TEXT_SIZE),
|
||||
},
|
||||
new MetricNumber(item.RankedScore)
|
||||
{
|
||||
Font = OsuFont.GetFont(size: TEXT_SIZE),
|
||||
},
|
||||
new ColoredMetricNumber(item.TotalScore),
|
||||
new MetricNumber(item.RankedScore),
|
||||
new ColoredText
|
||||
{
|
||||
Text = $@"{item.GradesCount.SS + item.GradesCount.SSPlus:N0}",
|
||||
Font = OsuFont.GetFont(size: TEXT_SIZE),
|
||||
},
|
||||
new ColoredText
|
||||
{
|
||||
Text = $@"{item.GradesCount.S + item.GradesCount.SPlus:N0}",
|
||||
Font = OsuFont.GetFont(size: TEXT_SIZE),
|
||||
},
|
||||
new ColoredText
|
||||
{
|
||||
Text = $@"{item.GradesCount.A:N0}",
|
||||
Font = OsuFont.GetFont(size: TEXT_SIZE),
|
||||
},
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user