1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 23:05:37 +08:00

Make playback speed sliderbar use the tooltip text as its display

This commit is contained in:
smoogipoo 2018-02-07 13:26:41 +09:00
parent 406ec6e92d
commit bd5db6fc8d
2 changed files with 4 additions and 4 deletions

View File

@ -42,7 +42,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
{
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
Text = "1x",
Text = "1.00x",
Font = @"Exo2.0-Bold",
}
},
@ -59,7 +59,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
}
};
sliderbar.Bindable.ValueChanged += rateMultiplier => multiplierText.Text = $"{rateMultiplier}x";
sliderbar.Bindable.ValueChanged += rateMultiplier => multiplierText.Text = $"{sliderbar.Bar.TooltipText}x";
}
protected override void LoadComplete()

View File

@ -13,6 +13,8 @@ namespace osu.Game.Screens.Play.PlayerSettings
public class PlayerSliderBar<T> : SettingsSlider<T>
where T : struct, IEquatable<T>, IComparable, IConvertible
{
public OsuSliderBar<T> Bar => (OsuSliderBar<T>)Control;
protected override Drawable CreateControl() => new Sliderbar
{
Margin = new MarginPadding { Top = 5, Bottom = 5 },
@ -21,8 +23,6 @@ namespace osu.Game.Screens.Play.PlayerSettings
private class Sliderbar : OsuSliderBar<T>
{
public override string TooltipText => $"{CurrentNumber.Value}";
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{