Remove usage of key repeat helper method

This commit is contained in:
Dean Herbert
2021-11-18 12:38:20 +09:00
parent d7b178ea37
commit 66c307e0ee
6 changed files with 10 additions and 151 deletions

View File

@ -14,7 +14,6 @@ using osu.Framework.Threading;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Configuration;
using osu.Game.Extensions;
using osu.Game.Input.Bindings;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Objects;
@ -204,11 +203,11 @@ namespace osu.Game.Rulesets.UI.Scrolling
switch (e.Action)
{
case GlobalAction.IncreaseScrollSpeed:
scheduleScrollSpeedAdjustment(1);
AdjustScrollSpeed(1);
return true;
case GlobalAction.DecreaseScrollSpeed:
scheduleScrollSpeedAdjustment(-1);
AdjustScrollSpeed(-1);
return true;
}
@ -223,12 +222,6 @@ namespace osu.Game.Rulesets.UI.Scrolling
scheduledScrollSpeedAdjustment = null;
}
private void scheduleScrollSpeedAdjustment(int amount)
{
scheduledScrollSpeedAdjustment?.Cancel();
scheduledScrollSpeedAdjustment = this.BeginKeyRepeat(Scheduler, () => AdjustScrollSpeed(amount));
}
private class LocalScrollingInfo : IScrollingInfo
{
public IBindable<ScrollingDirection> Direction { get; } = new Bindable<ScrollingDirection>();