1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 10:23:02 +08:00

Fix ordering of methods in OsuSliderBar

This commit is contained in:
Dean Herbert 2023-02-08 14:00:45 +09:00
parent cec1f77e6c
commit 5cd111e6f1

View File

@ -17,18 +17,12 @@ namespace osu.Game.Graphics.UserInterface
public abstract partial class OsuSliderBar<T> : SliderBar<T>, IHasTooltip public abstract partial class OsuSliderBar<T> : SliderBar<T>, IHasTooltip
where T : struct, IEquatable<T>, IComparable<T>, IConvertible where T : struct, IEquatable<T>, IComparable<T>, IConvertible
{ {
private Sample sample = null!;
private double lastSampleTime;
private T lastSampleValue;
public bool PlaySamplesOnAdjust { get; set; } = true; public bool PlaySamplesOnAdjust { get; set; } = true;
[BackgroundDependencyLoader] /// <summary>
private void load(AudioManager audio) /// Whether to format the tooltip as a percentage or the actual value.
{ /// </summary>
sample = audio.Samples.Get(@"UI/notch-tick"); public bool DisplayAsPercentage { get; set; }
}
public virtual LocalisableString TooltipText { get; private set; } public virtual LocalisableString TooltipText { get; private set; }
@ -37,10 +31,16 @@ namespace osu.Game.Graphics.UserInterface
/// </summary> /// </summary>
private const int max_decimal_digits = 5; private const int max_decimal_digits = 5;
/// <summary> private Sample sample = null!;
/// Whether to format the tooltip as a percentage or the actual value.
/// </summary> private double lastSampleTime;
public bool DisplayAsPercentage { get; set; } private T lastSampleValue;
[BackgroundDependencyLoader]
private void load(AudioManager audio)
{
sample = audio.Samples.Get(@"UI/notch-tick");
}
protected override void LoadComplete() protected override void LoadComplete()
{ {