From 73bc71f8b2b891a33d6e87fb33e0929d90c53758 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 4 Jul 2019 17:32:58 +0900 Subject: [PATCH] Use local clock to add consistency to skip times --- .../Visual/Gameplay/TestSceneSkipOverlay.cs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneSkipOverlay.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneSkipOverlay.cs index 8d2f71d9b4..a0e2e10c00 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestSceneSkipOverlay.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneSkipOverlay.cs @@ -3,6 +3,9 @@ using System.Linq; using NUnit.Framework; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; +using osu.Framework.Timing; using osu.Game.Screens.Play; using osuTK; using osuTK.Input; @@ -19,9 +22,20 @@ namespace osu.Game.Tests.Visual.Gameplay public void SetUp() => Schedule(() => { requestCount = 0; - Child = skip = new SkipOverlay(Clock.CurrentTime + 5000) + Child = new Container { - RequestSeek = _ => requestCount++ + RelativeSizeAxes = Axes.Both, + Clock = new FramedOffsetClock(Clock) + { + Offset = -Clock.CurrentTime, + }, + Children = new Drawable[] + { + skip = new SkipOverlay(5000) + { + RequestSeek = _ => requestCount++ + } + }, }; });