aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/plugins/theme_editor_plugin.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2016-01-17 20:03:57 -0300
committerJuan Linietsky2016-01-17 20:03:57 -0300
commit74a48a0140262ebd3a818a75b7d102cf0fe2eeae (patch)
tree6789b64b2df5bbf81d519a4d4d70d1e9f0c35655 /tools/editor/plugins/theme_editor_plugin.cpp
parent72fcb8a35beab251d01864bc67da3e3a8e75aed6 (diff)
downloadgodot-74a48a0140262ebd3a818a75b7d102cf0fe2eeae.tar.gz
godot-74a48a0140262ebd3a818a75b7d102cf0fe2eeae.tar.zst
godot-74a48a0140262ebd3a818a75b7d102cf0fe2eeae.zip
-Massive editor dialog cleanup
-Added a bottom menu list
Diffstat (limited to 'tools/editor/plugins/theme_editor_plugin.cpp')
-rw-r--r--tools/editor/plugins/theme_editor_plugin.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/tools/editor/plugins/theme_editor_plugin.cpp b/tools/editor/plugins/theme_editor_plugin.cpp
index f67f049b3..ef7b3b17c 100644
--- a/tools/editor/plugins/theme_editor_plugin.cpp
+++ b/tools/editor/plugins/theme_editor_plugin.cpp
@@ -831,21 +831,26 @@ bool ThemeEditorPlugin::handles(Object *p_node) const{
void ThemeEditorPlugin::make_visible(bool p_visible){
if (p_visible) {
- theme_editor->show();
theme_editor->set_process(true);
+ button->show();
} else {
- theme_editor->hide();
theme_editor->set_process(false);
+ if (theme_editor->is_visible())
+ EditorNode::get_singleton()->hide_bottom_panel();
+ button->hide();
}
}
ThemeEditorPlugin::ThemeEditorPlugin(EditorNode *p_node) {
+ editor=p_node;
theme_editor = memnew( ThemeEditor );
+ theme_editor->set_custom_minimum_size(Size2(0,500));
+
+// p_node->get_viewport()->add_child(theme_editor);
+ button=EditorNode::get_singleton()->add_bottom_panel_item("Theme",theme_editor);
+ button->hide();
- p_node->get_viewport()->add_child(theme_editor);
- theme_editor->set_area_as_parent_rect();
- theme_editor->hide();
}