From bd5db6fc8d74c241a670cb508e3b4a1a09327896 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Wed, 7 Feb 2018 13:26:41 +0900 Subject: [PATCH] Make playback speed sliderbar use the tooltip text as its display --- osu.Game/Screens/Play/PlayerSettings/PlaybackSettings.cs | 4 ++-- osu.Game/Screens/Play/PlayerSettings/PlayerSliderBar.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/osu.Game/Screens/Play/PlayerSettings/PlaybackSettings.cs b/osu.Game/Screens/Play/PlayerSettings/PlaybackSettings.cs index 15d8e73a76..3229b022de 100644 --- a/osu.Game/Screens/Play/PlayerSettings/PlaybackSettings.cs +++ b/osu.Game/Screens/Play/PlayerSettings/PlaybackSettings.cs @@ -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() diff --git a/osu.Game/Screens/Play/PlayerSettings/PlayerSliderBar.cs b/osu.Game/Screens/Play/PlayerSettings/PlayerSliderBar.cs index 946669e3dd..43fe14cc24 100644 --- a/osu.Game/Screens/Play/PlayerSettings/PlayerSliderBar.cs +++ b/osu.Game/Screens/Play/PlayerSettings/PlayerSliderBar.cs @@ -13,6 +13,8 @@ namespace osu.Game.Screens.Play.PlayerSettings public class PlayerSliderBar : SettingsSlider where T : struct, IEquatable, IComparable, IConvertible { + public OsuSliderBar Bar => (OsuSliderBar)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 { - public override string TooltipText => $"{CurrentNumber.Value}"; - [BackgroundDependencyLoader] private void load(OsuColour colours) {