1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 18:42:56 +08:00

Change editor speed adjust to adjust frequency

This commit is contained in:
Dean Herbert 2021-03-19 20:01:45 +09:00
parent 413754ede3
commit 8955071703

View File

@ -27,7 +27,7 @@ namespace osu.Game.Screens.Edit.Components
[Resolved]
private EditorClock editorClock { get; set; }
private readonly BindableNumber<double> tempo = new BindableDouble(1);
private readonly BindableNumber<double> freqAdjust = new BindableDouble(1);
[BackgroundDependencyLoader]
private void load()
@ -58,16 +58,16 @@ namespace osu.Game.Screens.Edit.Components
RelativeSizeAxes = Axes.Both,
Height = 0.5f,
Padding = new MarginPadding { Left = 45 },
Child = new PlaybackTabControl { Current = tempo },
Child = new PlaybackTabControl { Current = freqAdjust },
}
};
Track.BindValueChanged(tr => tr.NewValue?.AddAdjustment(AdjustableProperty.Tempo, tempo), true);
Track.BindValueChanged(tr => tr.NewValue?.AddAdjustment(AdjustableProperty.Frequency, freqAdjust), true);
}
protected override void Dispose(bool isDisposing)
{
Track.Value?.RemoveAdjustment(AdjustableProperty.Tempo, tempo);
Track.Value?.RemoveAdjustment(AdjustableProperty.Frequency, freqAdjust);
base.Dispose(isDisposing);
}
@ -101,7 +101,7 @@ namespace osu.Game.Screens.Edit.Components
private class PlaybackTabControl : OsuTabControl<double>
{
private static readonly double[] tempo_values = { 0.5, 0.75, 1 };
private static readonly double[] tempo_values = { 0.25, 0.5, 0.75, 1 };
protected override TabItem<double> CreateTabItem(double value) => new PlaybackTabItem(value);