mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 03:22:55 +08:00
Make playback speed sliderbar use the tooltip text as its display
This commit is contained in:
parent
406ec6e92d
commit
bd5db6fc8d
@ -42,7 +42,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.CentreRight,
|
Anchor = Anchor.CentreRight,
|
||||||
Origin = Anchor.CentreRight,
|
Origin = Anchor.CentreRight,
|
||||||
Text = "1x",
|
Text = "1.00x",
|
||||||
Font = @"Exo2.0-Bold",
|
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()
|
protected override void LoadComplete()
|
||||||
|
@ -13,6 +13,8 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
|||||||
public class PlayerSliderBar<T> : SettingsSlider<T>
|
public class PlayerSliderBar<T> : SettingsSlider<T>
|
||||||
where T : struct, IEquatable<T>, IComparable, IConvertible
|
where T : struct, IEquatable<T>, IComparable, IConvertible
|
||||||
{
|
{
|
||||||
|
public OsuSliderBar<T> Bar => (OsuSliderBar<T>)Control;
|
||||||
|
|
||||||
protected override Drawable CreateControl() => new Sliderbar
|
protected override Drawable CreateControl() => new Sliderbar
|
||||||
{
|
{
|
||||||
Margin = new MarginPadding { Top = 5, Bottom = 5 },
|
Margin = new MarginPadding { Top = 5, Bottom = 5 },
|
||||||
@ -21,8 +23,6 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
|||||||
|
|
||||||
private class Sliderbar : OsuSliderBar<T>
|
private class Sliderbar : OsuSliderBar<T>
|
||||||
{
|
{
|
||||||
public override string TooltipText => $"{CurrentNumber.Value}";
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user