1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-27 02:32:59 +08:00

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>
private const float left_area_size = 240;
protected override bool UserScrollSpeedAdjustment => false;
private readonly Container<HitExplosion> hitExplosionContainer;
private readonly Container<KiaiHitExplosion> kiaiExplosionContainer;

View File

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