mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 00:43:21 +08:00
9247ff3e0a
Scroll speed is not saved and doesn't affect gameplay. It is purely a feature for a better visualization. It is currently bind to scroll speed increase/decrease. Default F3/F4 crashes with editor shortcuts so it has to be changed.
38 lines
1.3 KiB
C#
38 lines
1.3 KiB
C#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
#nullable disable
|
|
|
|
using System.Collections.Generic;
|
|
using osu.Framework.Bindables;
|
|
using osu.Game.Beatmaps;
|
|
using osu.Game.Rulesets.Catch.UI;
|
|
using osu.Game.Rulesets.Mods;
|
|
using osu.Game.Rulesets.UI;
|
|
|
|
namespace osu.Game.Rulesets.Catch.Edit
|
|
{
|
|
public class DrawableCatchEditorRuleset : DrawableCatchRuleset
|
|
{
|
|
public readonly BindableDouble TimeRangeMultiplier = new BindableDouble(1);
|
|
|
|
public DrawableCatchEditorRuleset(Ruleset ruleset, IBeatmap beatmap, IReadOnlyList<Mod> mods = null)
|
|
: base(ruleset, beatmap, mods)
|
|
{
|
|
}
|
|
|
|
protected override void Update()
|
|
{
|
|
base.Update();
|
|
|
|
double gamePlayTimeRange = GetTimeRange(Beatmap.Difficulty.ApproachRate);
|
|
float playfieldStretch = Playfield.DrawHeight / CatchPlayfield.HEIGHT;
|
|
TimeRange.Value = gamePlayTimeRange * TimeRangeMultiplier.Value * playfieldStretch;
|
|
}
|
|
|
|
protected override Playfield CreatePlayfield() => new CatchEditorPlayfield(Beatmap.Difficulty);
|
|
|
|
public override PlayfieldAdjustmentContainer CreatePlayfieldAdjustmentContainer() => new CatchEditorPlayfieldAdjustmentContainer();
|
|
}
|
|
}
|