mirror of
https://github.com/ppy/osu
synced 2024-12-29 10:22:43 +00:00
Fix scroll wheel being handled by base test scene
This commit is contained in:
parent
1dd354120b
commit
e760ed8e01
@ -17,6 +17,8 @@ namespace osu.Game.Tests.Visual.Editing
|
||||
[Cached(typeof(IBeatSnapProvider))]
|
||||
private readonly EditorBeatmap editorBeatmap;
|
||||
|
||||
protected override bool ScrollUsingMouseWheel => false;
|
||||
|
||||
public TestSceneTimingScreen()
|
||||
{
|
||||
editorBeatmap = new EditorBeatmap(CreateBeatmap(new OsuRuleset().RulesetInfo));
|
||||
|
@ -20,6 +20,8 @@ namespace osu.Game.Tests.Visual
|
||||
protected readonly BindableBeatDivisor BeatDivisor = new BindableBeatDivisor();
|
||||
protected new readonly EditorClock Clock;
|
||||
|
||||
protected virtual bool ScrollUsingMouseWheel => true;
|
||||
|
||||
protected EditorClockTestScene()
|
||||
{
|
||||
Clock = new EditorClock(new ControlPointInfo(), 5000, BeatDivisor) { IsCoupled = false };
|
||||
@ -57,6 +59,9 @@ namespace osu.Game.Tests.Visual
|
||||
|
||||
protected override bool OnScroll(ScrollEvent e)
|
||||
{
|
||||
if (!ScrollUsingMouseWheel)
|
||||
return false;
|
||||
|
||||
if (e.ScrollDelta.Y > 0)
|
||||
Clock.SeekBackward(true);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user