mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 22:22:54 +08: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.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Graphics.UserInterfaceV2;
|
using osu.Game.Graphics.UserInterfaceV2;
|
||||||
using osu.Game.Localisation;
|
using osu.Game.Localisation;
|
||||||
|
using osu.Game.Screens.Play.PlayerSettings;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings.Sections.Audio
|
namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||||
@ -67,7 +69,7 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
|||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new TimeSlider
|
new OffsetSliderBar
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Current = { BindTarget = Current },
|
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.";
|
: $@"Based on the last {averageHitErrorHistory.Count} play(s), the suggested offset is {SuggestedOffset.Value:N0} ms.";
|
||||||
applySuggestion.Enabled.Value = SuggestedOffset.Value != null;
|
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();
|
protected override Drawable CreateControl() => new CustomSliderBar();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user