From 61fb9f5613dc47c07a96b88eba4f40f23efeb0c2 Mon Sep 17 00:00:00 2001 From: mcendu Date: Sun, 29 Dec 2019 23:18:50 +0800 Subject: [PATCH] Remove class StageHint and usage --- .../UI/Components/ColumnHitObjectArea.cs | 9 +++++---- osu.Game.Rulesets.Mania/UI/Components/StageHint.cs | 14 -------------- 2 files changed, 5 insertions(+), 18 deletions(-) delete mode 100644 osu.Game.Rulesets.Mania/UI/Components/StageHint.cs diff --git a/osu.Game.Rulesets.Mania/UI/Components/ColumnHitObjectArea.cs b/osu.Game.Rulesets.Mania/UI/Components/ColumnHitObjectArea.cs index 6bfb2b89aa..494da6c61b 100644 --- a/osu.Game.Rulesets.Mania/UI/Components/ColumnHitObjectArea.cs +++ b/osu.Game.Rulesets.Mania/UI/Components/ColumnHitObjectArea.cs @@ -22,11 +22,11 @@ namespace osu.Game.Rulesets.Mania.UI.Components private readonly IBindable direction = new Bindable(); - private readonly StageHint stageHint; + private readonly Drawable stageHint; public ColumnHitObjectArea(HitObjectContainer hitObjectContainer) { - InternalChildren = new Drawable[] + InternalChildren = new[] { stageHint = new DefaultStageHint { @@ -60,11 +60,12 @@ namespace osu.Game.Rulesets.Mania.UI.Components accentColour = value; - stageHint.AccentColour = accentColour; + if (stageHint is IHasAccentColour colouredHitTarget) + colouredHitTarget.AccentColour = accentColour; } } - private class DefaultStageHint : StageHint + private class DefaultStageHint : CompositeDrawable, IHasAccentColour { private readonly IBindable direction = new Bindable(); diff --git a/osu.Game.Rulesets.Mania/UI/Components/StageHint.cs b/osu.Game.Rulesets.Mania/UI/Components/StageHint.cs deleted file mode 100644 index 813a6928c9..0000000000 --- a/osu.Game.Rulesets.Mania/UI/Components/StageHint.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. -// See the LICENCE file in the repository root for full licence text. - -using osu.Framework.Graphics.Containers; -using osu.Game.Graphics; -using osuTK.Graphics; - -namespace osu.Game.Rulesets.Mania.UI.Components -{ - public abstract class StageHint : CompositeDrawable, IHasAccentColour - { - public virtual Color4 AccentColour { get; set; } - } -}