From 7aa30ca3f67f36ad07dea543d3f9f21305b5df17 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 6 Mar 2019 17:23:13 +0900 Subject: [PATCH] Change method of cursor creation --- osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs | 5 +---- osu.Game/Rulesets/UI/Playfield.cs | 11 ++--------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs b/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs index e2be955200..47a064beee 100644 --- a/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs +++ b/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs @@ -10,7 +10,6 @@ using osu.Game.Rulesets.Osu.Objects.Drawables; using osu.Game.Rulesets.Osu.Objects.Drawables.Connections; using osu.Game.Rulesets.UI; using System.Linq; -using osu.Framework.Graphics.Cursor; using osu.Game.Rulesets.Judgements; using osu.Game.Rulesets.Osu.UI.Cursor; @@ -36,7 +35,6 @@ namespace osu.Game.Rulesets.Osu.UI RelativeSizeAxes = Axes.Both, Children = new Drawable[] { - Cursor, connectionLayer = new FollowPointRenderer { RelativeSizeAxes = Axes.Both, @@ -53,12 +51,11 @@ namespace osu.Game.Rulesets.Osu.UI RelativeSizeAxes = Axes.Both, Depth = -1, }, + Cursor = new GameplayCursorContainer(), } }; } - protected override CursorContainer CreateCursor() => new GameplayCursorContainer(); - public override void Add(DrawableHitObject h) { h.OnNewResult += onNewResult; diff --git a/osu.Game/Rulesets/UI/Playfield.cs b/osu.Game/Rulesets/UI/Playfield.cs index c1cce52c8c..708db55c4d 100644 --- a/osu.Game/Rulesets/UI/Playfield.cs +++ b/osu.Game/Rulesets/UI/Playfield.cs @@ -58,8 +58,6 @@ namespace osu.Game.Rulesets.UI RelativeSizeAxes = Axes.Both; hitObjectContainerLazy = new Lazy(CreateHitObjectContainer); - - Cursor = CreateCursor(); } private WorkingBeatmap beatmap; @@ -88,14 +86,9 @@ namespace osu.Game.Rulesets.UI public virtual bool Remove(DrawableHitObject h) => HitObjectContainer.Remove(h); /// - /// Creates the cursor. May be null if no cursor is required. + /// The cursor currently being used by this . May be null if no cursor is provided. /// - protected virtual CursorContainer CreateCursor() => null; - - /// - /// The cursor provided by this . May be null if no cursor is provided. - /// - public CursorContainer Cursor { get; } + public CursorContainer Cursor { get; protected set; } /// /// Registers a as a nested .