diff options
author | trollodel <33117082+trollodel@users.noreply.github.com> | 2022-01-27 10:36:51 +0100 |
---|---|---|
committer | trollodel <33117082+trollodel@users.noreply.github.com> | 2022-02-14 14:16:24 +0100 |
commit | 05b56f316ddc94c2bb55b62477ec3914fe81a220 (patch) | |
tree | 928404930fc4f99dfb45d64a6b510e66e2bcc357 /editor/plugins/sprite_frames_editor_plugin.cpp | |
parent | f5a27ee4fe45925cebfda11ea7d53ca8f39e0a13 (diff) |
Remove most EditorNode constructor parameters and fields
Diffstat (limited to 'editor/plugins/sprite_frames_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/sprite_frames_editor_plugin.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index 5e0a53e354..c8db16d3be 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -1329,20 +1329,19 @@ bool SpriteFramesEditorPlugin::handles(Object *p_object) const { void SpriteFramesEditorPlugin::make_visible(bool p_visible) { if (p_visible) { button->show(); - editor->make_bottom_panel_item_visible(frames_editor); + EditorNode::get_singleton()->make_bottom_panel_item_visible(frames_editor); } else { button->hide(); if (frames_editor->is_visible_in_tree()) { - editor->hide_bottom_panel(); + EditorNode::get_singleton()->hide_bottom_panel(); } } } -SpriteFramesEditorPlugin::SpriteFramesEditorPlugin(EditorNode *p_node) { - editor = p_node; +SpriteFramesEditorPlugin::SpriteFramesEditorPlugin() { frames_editor = memnew(SpriteFramesEditor); frames_editor->set_custom_minimum_size(Size2(0, 300) * EDSCALE); - button = editor->add_bottom_panel_item(TTR("SpriteFrames"), frames_editor); + button = EditorNode::get_singleton()->add_bottom_panel_item(TTR("SpriteFrames"), frames_editor); button->hide(); } |