summaryrefslogtreecommitdiffstats
path: root/tools/editor/plugins/sample_library_editor_plugin.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-01-17 20:03:57 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-01-17 20:03:57 -0300
commit74a48a0140262ebd3a818a75b7d102cf0fe2eeae (patch)
tree6789b64b2df5bbf81d519a4d4d70d1e9f0c35655 /tools/editor/plugins/sample_library_editor_plugin.cpp
parent72fcb8a35beab251d01864bc67da3e3a8e75aed6 (diff)
downloadredot-engine-74a48a0140262ebd3a818a75b7d102cf0fe2eeae.tar.gz
-Massive editor dialog cleanup
-Added a bottom menu list
Diffstat (limited to 'tools/editor/plugins/sample_library_editor_plugin.cpp')
-rw-r--r--tools/editor/plugins/sample_library_editor_plugin.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/tools/editor/plugins/sample_library_editor_plugin.cpp b/tools/editor/plugins/sample_library_editor_plugin.cpp
index 493ae405ba..a28fbb2ec8 100644
--- a/tools/editor/plugins/sample_library_editor_plugin.cpp
+++ b/tools/editor/plugins/sample_library_editor_plugin.cpp
@@ -423,11 +423,16 @@ bool SampleLibraryEditorPlugin::handles(Object *p_object) const {
void SampleLibraryEditorPlugin::make_visible(bool p_visible) {
if (p_visible) {
- sample_library_editor->show();
+ //sample_library_editor->show();
+ button->show();
+ editor->make_bottom_panel_item_visible(sample_library_editor);
// sample_library_editor->set_process(true);
} else {
- sample_library_editor->hide();
+ if (sample_library_editor->is_visible())
+ editor->hide_bottom_panel();
+ button->hide();
+
// sample_library_editor->set_process(false);
}
@@ -437,11 +442,16 @@ SampleLibraryEditorPlugin::SampleLibraryEditorPlugin(EditorNode *p_node) {
editor=p_node;
sample_library_editor = memnew( SampleLibraryEditor );
- editor->get_viewport()->add_child(sample_library_editor);
- sample_library_editor->set_area_as_parent_rect();
+
+ //editor->get_viewport()->add_child(sample_library_editor);
+ sample_library_editor->set_custom_minimum_size(Size2(0,250));
+ button=p_node->add_bottom_panel_item("SampleLibrary",sample_library_editor);
+ button->hide();
+
+ //sample_library_editor->set_area_as_parent_rect();
// sample_library_editor->set_anchor( MARGIN_TOP, Control::ANCHOR_END);
// sample_library_editor->set_margin( MARGIN_TOP, 120 );
- sample_library_editor->hide();
+ //sample_library_editor->hide();