mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 06:42:56 +08:00
Better counter formatization
Now CS and HP have 1 decimal point precision, while AR and OD is kept with 2 because of future support of rate-changed AR/OD
This commit is contained in:
parent
ed213dad6c
commit
507f9642cc
@ -159,10 +159,10 @@ namespace osu.Game.Overlays.Mods
|
||||
Direction = FillDirection.Horizontal,
|
||||
Children = new[]
|
||||
{
|
||||
circleSizeDisplay = new VerticalAttributeDisplay("CS"),
|
||||
drainRateDisplay = new VerticalAttributeDisplay("HP"),
|
||||
approachRateDisplay = new VerticalAttributeDisplay("AR"),
|
||||
overallDifficultyDisplay = new VerticalAttributeDisplay("OD"),
|
||||
circleSizeDisplay = new VerticalAttributeDisplay("CS", "0.#"),
|
||||
drainRateDisplay = new VerticalAttributeDisplay("HP", "0.#"),
|
||||
approachRateDisplay = new VerticalAttributeDisplay("AR", "0.##"),
|
||||
overallDifficultyDisplay = new VerticalAttributeDisplay("OD", "0.##"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ namespace osu.Game.Overlays.Mods
|
||||
/// </summary>
|
||||
public LocalisableString Label { get; protected set; }
|
||||
|
||||
public VerticalAttributeDisplay(LocalisableString label)
|
||||
public VerticalAttributeDisplay(LocalisableString label, string format = "0.#")
|
||||
{
|
||||
Label = label;
|
||||
AutoSizeAxes = Axes.X;
|
||||
@ -54,7 +54,8 @@ namespace osu.Game.Overlays.Mods
|
||||
{
|
||||
Origin = Anchor.Centre,
|
||||
Anchor = Anchor.Centre,
|
||||
Current = { BindTarget = Current }
|
||||
Current = { BindTarget = Current },
|
||||
Format = format
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -64,7 +65,9 @@ namespace osu.Game.Overlays.Mods
|
||||
{
|
||||
protected override double RollingDuration => 500;
|
||||
|
||||
protected override LocalisableString FormatCount(double count) => count.ToLocalisableString("0.##");
|
||||
public string Format = "0.#";
|
||||
|
||||
protected override LocalisableString FormatCount(double count) => count.ToLocalisableString(Format);
|
||||
|
||||
protected override OsuSpriteText CreateSpriteText() => new OsuSpriteText
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user