diff --git a/DungeonShooting_Godot/src/game/ui/editorWindow/CustomButtonCell.cs b/DungeonShooting_Godot/src/game/ui/editorWindow/CustomButtonCell.cs index a03439e..67f2284 100644 --- a/DungeonShooting_Godot/src/game/ui/editorWindow/CustomButtonCell.cs +++ b/DungeonShooting_Godot/src/game/ui/editorWindow/CustomButtonCell.cs @@ -12,11 +12,6 @@ CellNode.L_Button.Instance.Text = data.Text; } - public override void OnDestroy() - { - CellNode.L_Button.Instance.Pressed -= OnClick; - } - public override void OnClick() { if (Data.Callback != null) diff --git a/DungeonShooting_Godot/src/game/ui/editorWindow/EditorWindowPanel.cs b/DungeonShooting_Godot/src/game/ui/editorWindow/EditorWindowPanel.cs index 6d20e02..2eae731 100644 --- a/DungeonShooting_Godot/src/game/ui/editorWindow/EditorWindowPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/editorWindow/EditorWindowPanel.cs @@ -45,7 +45,7 @@ if (_uiGrid == null) { S_CustomButton.Instance.Visible = true; - _uiGrid = new UiGrid(S_CustomButton, typeof(CustomButtonCell)); + _uiGrid = CreateUiGrid(S_CustomButton); _uiGrid.SetHorizontalExpand(true); } _uiGrid.SetColumns(buttons.Length);