mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 18:33:20 +08:00
Change editor speed adjust to adjust frequency
This commit is contained in:
parent
413754ede3
commit
8955071703
@ -27,7 +27,7 @@ namespace osu.Game.Screens.Edit.Components
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private EditorClock editorClock { get; set; }
|
private EditorClock editorClock { get; set; }
|
||||||
|
|
||||||
private readonly BindableNumber<double> tempo = new BindableDouble(1);
|
private readonly BindableNumber<double> freqAdjust = new BindableDouble(1);
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
@ -58,16 +58,16 @@ namespace osu.Game.Screens.Edit.Components
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Height = 0.5f,
|
Height = 0.5f,
|
||||||
Padding = new MarginPadding { Left = 45 },
|
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)
|
protected override void Dispose(bool isDisposing)
|
||||||
{
|
{
|
||||||
Track.Value?.RemoveAdjustment(AdjustableProperty.Tempo, tempo);
|
Track.Value?.RemoveAdjustment(AdjustableProperty.Frequency, freqAdjust);
|
||||||
|
|
||||||
base.Dispose(isDisposing);
|
base.Dispose(isDisposing);
|
||||||
}
|
}
|
||||||
@ -101,7 +101,7 @@ namespace osu.Game.Screens.Edit.Components
|
|||||||
|
|
||||||
private class PlaybackTabControl : OsuTabControl<double>
|
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);
|
protected override TabItem<double> CreateTabItem(double value) => new PlaybackTabItem(value);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user