From f07a31b2ca3881f0c1205160d155aef31ea554d3 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 15 Jun 2017 15:17:05 +0900 Subject: [PATCH] Make hitobjects a bit more visual --- .../Tests/TestCaseScrollingHitObjects.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/osu.Desktop.VisualTests/Tests/TestCaseScrollingHitObjects.cs b/osu.Desktop.VisualTests/Tests/TestCaseScrollingHitObjects.cs index 7935e31042..e2620f4246 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseScrollingHitObjects.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseScrollingHitObjects.cs @@ -118,6 +118,7 @@ public override void Reset() protected override void Update() { base.Update(); + topTime.Text = Time.Current.ToString("#,#"); bottomTime.Text = (Time.Current + timeRangeBindable.Value).ToString("#,#"); } @@ -152,6 +153,7 @@ protected override void Update() private class TestDrawableHitObject : DrawableHitObject { + private readonly Box background; private const float height = 14; public TestDrawableHitObject(HitObject hitObject) @@ -165,7 +167,7 @@ public TestDrawableHitObject(HitObject hitObject) Children = new Drawable[] { - new Box + background = new Box { RelativeSizeAxes = Axes.X, Height = height, @@ -187,6 +189,19 @@ public TestDrawableHitObject(HitObject hitObject) } }; } + + protected override void LoadComplete() + { + base.LoadComplete(); + FadeInFromZero(250, EasingTypes.OutQuint); + } + + protected override void Update() + { + base.Update(); + if (Time.Current >= HitObject.StartTime) + background.Colour = Color4.Red; + } } } }