mirror of
https://github.com/ppy/osu.git
synced 2024-11-14 15:57:24 +08:00
Merge pull request #23832 from peppy/fix-catch-distance-spacing-display
Fix weird right-toolbox distance snapping display in osu!catch editor
This commit is contained in:
commit
fbbeb3893b
@ -125,6 +125,7 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
if (currentSnap > DistanceSpacingMultiplier.MinValue)
|
if (currentSnap > DistanceSpacingMultiplier.MinValue)
|
||||||
{
|
{
|
||||||
currentDistanceSpacingButton.Enabled.Value = currentDistanceSpacingButton.Expanded.Value
|
currentDistanceSpacingButton.Enabled.Value = currentDistanceSpacingButton.Expanded.Value
|
||||||
|
&& !DistanceSpacingMultiplier.Disabled
|
||||||
&& !Precision.AlmostEquals(currentSnap, DistanceSpacingMultiplier.Value, DistanceSpacingMultiplier.Precision / 2);
|
&& !Precision.AlmostEquals(currentSnap, DistanceSpacingMultiplier.Value, DistanceSpacingMultiplier.Precision / 2);
|
||||||
currentDistanceSpacingButton.ContractedLabelText = $"current {currentSnap:N2}x";
|
currentDistanceSpacingButton.ContractedLabelText = $"current {currentSnap:N2}x";
|
||||||
currentDistanceSpacingButton.ExpandedLabelText = $"Use current ({currentSnap:N2}x)";
|
currentDistanceSpacingButton.ExpandedLabelText = $"Use current ({currentSnap:N2}x)";
|
||||||
@ -141,8 +142,12 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
if (!DistanceSpacingMultiplier.Disabled)
|
if (DistanceSpacingMultiplier.Disabled)
|
||||||
{
|
{
|
||||||
|
distanceSpacingSlider.Hide();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
DistanceSpacingMultiplier.Value = EditorBeatmap.BeatmapInfo.DistanceSpacing;
|
DistanceSpacingMultiplier.Value = EditorBeatmap.BeatmapInfo.DistanceSpacing;
|
||||||
DistanceSpacingMultiplier.BindValueChanged(multiplier =>
|
DistanceSpacingMultiplier.BindValueChanged(multiplier =>
|
||||||
{
|
{
|
||||||
@ -163,7 +168,6 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
});
|
});
|
||||||
DistanceSpacingMultiplier.BindValueChanged(spacing => distanceSpacingSlider.Current.Value = spacing.NewValue);
|
DistanceSpacingMultiplier.BindValueChanged(spacing => distanceSpacingSlider.Current.Value = spacing.NewValue);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
protected override IEnumerable<TernaryButton> CreateTernaryButtons() => base.CreateTernaryButtons().Concat(new[]
|
protected override IEnumerable<TernaryButton> CreateTernaryButtons() => base.CreateTernaryButtons().Concat(new[]
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user