Add a flag to disable user scroll speed adjustments

This commit is contained in:
smoogipoo 2018-01-11 12:44:17 +09:00
parent 6a5a3b01b2
commit 3a869edf36
2 changed files with 9 additions and 0 deletions

View File

@ -37,6 +37,7 @@ namespace osu.Game.Rulesets.Taiko.UI
/// </summary> /// </summary>
private const float left_area_size = 240; private const float left_area_size = 240;
protected override bool UserScrollSpeedAdjustment => false;
private readonly Container<HitExplosion> hitExplosionContainer; private readonly Container<HitExplosion> hitExplosionContainer;
private readonly Container<KiaiHitExplosion> kiaiExplosionContainer; private readonly Container<KiaiHitExplosion> kiaiExplosionContainer;

View File

@ -47,6 +47,11 @@ namespace osu.Game.Rulesets.UI.Scrolling
MaxValue = time_span_max MaxValue = time_span_max
}; };
/// <summary>
/// Whether the player can change <see cref="VisibleTimeRange"/>.
/// </summary>
protected virtual bool UserScrollSpeedAdjustment => true;
/// <summary> /// <summary>
/// The container that contains the <see cref="SpeedAdjustmentContainer"/>s and <see cref="DrawableHitObject"/>s. /// The container that contains the <see cref="SpeedAdjustmentContainer"/>s and <see cref="DrawableHitObject"/>s.
/// </summary> /// </summary>
@ -92,6 +97,9 @@ namespace osu.Game.Rulesets.UI.Scrolling
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
{ {
if (!UserScrollSpeedAdjustment)
return false;
if (state.Keyboard.ControlPressed) if (state.Keyboard.ControlPressed)
{ {
switch (args.Key) switch (args.Key)