mirror of
https://github.com/ppy/osu
synced 2025-01-30 01:42:54 +00:00
Show tooltip on global offset adjust slider bar
This commit is contained in:
parent
123e36a999
commit
cc7be137bc
@ -12,12 +12,14 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Graphics.UserInterfaceV2;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Screens.Play.PlayerSettings;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
@ -67,7 +69,7 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
Direction = FillDirection.Vertical,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new TimeSlider
|
||||
new OffsetSliderBar
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Current = { BindTarget = Current },
|
||||
@ -157,6 +159,11 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
: $@"Based on the last {averageHitErrorHistory.Count} play(s), the suggested offset is {SuggestedOffset.Value:N0} ms.";
|
||||
applySuggestion.Enabled.Value = SuggestedOffset.Value != null;
|
||||
}
|
||||
|
||||
private partial class OffsetSliderBar : RoundedSliderBar<double>
|
||||
{
|
||||
public override LocalisableString TooltipText => BeatmapOffsetControl.GetOffsetExplanatoryText(Current.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -307,7 +307,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
||||
}
|
||||
}
|
||||
|
||||
public partial class OffsetSliderBar : PlayerSliderBar<double>
|
||||
private partial class OffsetSliderBar : PlayerSliderBar<double>
|
||||
{
|
||||
protected override Drawable CreateControl() => new CustomSliderBar();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user