Fix multiple cursors appearing

This commit is contained in:
Dean Herbert 2019-03-25 19:21:34 +09:00
parent c79d187a89
commit 9588944048
1 changed files with 6 additions and 2 deletions

View File

@ -35,12 +35,16 @@ public override void Show()
{ {
base.Show(); base.Show();
clickToResumeCursor.ShowAt(GameplayCursor.ActiveCursor.Position); clickToResumeCursor.ShowAt(GameplayCursor.ActiveCursor.Position);
Add(localCursorContainer = new GameplayCursorContainer());
if (localCursorContainer == null)
Add(localCursorContainer = new GameplayCursorContainer());
} }
public override void Hide() public override void Hide()
{ {
localCursorContainer.Expire(); localCursorContainer?.Expire();
localCursorContainer = null;
base.Hide(); base.Hide();
} }