Remove most EditorNode constructor parameters and fields

This commit is contained in:
trollodel 2022-01-27 10:36:51 +01:00
parent f5a27ee4fe
commit 05b56f316d
144 changed files with 568 additions and 714 deletions

View file

@ -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();
}