1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

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

@@ -3757,21 +3757,20 @@ bool ThemeEditorPlugin::handles(Object *p_node) const {
void ThemeEditorPlugin::make_visible(bool p_visible) {
if (p_visible) {
button->show();
editor->make_bottom_panel_item_visible(theme_editor);
EditorNode::get_singleton()->make_bottom_panel_item_visible(theme_editor);
} else {
if (theme_editor->is_visible_in_tree()) {
editor->hide_bottom_panel();
EditorNode::get_singleton()->hide_bottom_panel();
}
button->hide();
}
}
ThemeEditorPlugin::ThemeEditorPlugin(EditorNode *p_node) {
editor = p_node;
ThemeEditorPlugin::ThemeEditorPlugin() {
theme_editor = memnew(ThemeEditor);
theme_editor->set_custom_minimum_size(Size2(0, 200) * EDSCALE);
button = editor->add_bottom_panel_item(TTR("Theme"), theme_editor);
button = EditorNode::get_singleton()->add_bottom_panel_item(TTR("Theme"), theme_editor);
button->hide();
}