Unstable 0.16.1.0
This commit is contained in:
+11
-1
@@ -14,7 +14,7 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
if (selectionUI == null)
|
||||
{
|
||||
selectionUI = new SubmarineSelection(true, null, GUICanvas.Instance.ItemComponentHolder);
|
||||
selectionUI = new SubmarineSelection(true, null, GUI.Canvas);
|
||||
}
|
||||
|
||||
GuiFrame = selectionUI.GuiFrame;
|
||||
@@ -35,5 +35,15 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
selectionUI?.Update();
|
||||
}
|
||||
|
||||
protected override void RemoveComponentSpecific()
|
||||
{
|
||||
base.RemoveComponentSpecific();
|
||||
if (selectionUI != null)
|
||||
{
|
||||
selectionUI.GuiFrame.RectTransform.Parent = null;
|
||||
selectionUI = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user