diff options
| author | marynate | 2014-07-10 10:55:03 +0800 |
|---|---|---|
| committer | marynate | 2014-07-10 15:42:34 +0800 |
| commit | e6df7da6abe89979dea501cd48ff288f27a3c394 (patch) | |
| tree | d5f40f14240837e0403e778d51d3dd1e7dbb7b87 /tools/editor/plugins/particles_editor_plugin.cpp | |
| parent | 9ff6d55822647c87eef392147ea15641d0922d47 (diff) | |
| download | godot-e6df7da6abe89979dea501cd48ff288f27a3c394.tar.gz godot-e6df7da6abe89979dea501cd48ff288f27a3c394.tar.zst godot-e6df7da6abe89979dea501cd48ff288f27a3c394.zip | |
Particles editor menu not display in proper position
Diffstat (limited to 'tools/editor/plugins/particles_editor_plugin.cpp')
| -rw-r--r-- | tools/editor/plugins/particles_editor_plugin.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/tools/editor/plugins/particles_editor_plugin.cpp b/tools/editor/plugins/particles_editor_plugin.cpp index 38781d93b..418ad1170 100644 --- a/tools/editor/plugins/particles_editor_plugin.cpp +++ b/tools/editor/plugins/particles_editor_plugin.cpp @@ -29,6 +29,7 @@ #include "particles_editor_plugin.h" #include "io/resource_loader.h" #include "servers/visual/particle_system_sw.h" +#include "tools/editor/plugins/spatial_editor_plugin.h" void ParticlesEditor::_node_removed(Node *p_node) { @@ -340,9 +341,11 @@ void ParticlesEditor::_bind_methods() { ParticlesEditor::ParticlesEditor() { + particles_editor_hb = memnew ( HBoxContainer ); + SpatialEditor::get_singleton()->add_control_to_menu_panel(particles_editor_hb); options = memnew( MenuButton ); - add_child(options); - options->set_area_as_parent_rect(); + particles_editor_hb->add_child(options); + particles_editor_hb->hide(); options->set_text("Particles"); options->get_popup()->add_item("Generate AABB",MENU_OPTION_GENERATE_AABB); @@ -429,8 +432,9 @@ void ParticlesEditorPlugin::make_visible(bool p_visible) { if (p_visible) { particles_editor->show(); + particles_editor->particles_editor_hb->show(); } else { - + particles_editor->particles_editor_hb->hide(); particles_editor->hide(); particles_editor->edit(NULL); } @@ -443,14 +447,6 @@ ParticlesEditorPlugin::ParticlesEditorPlugin(EditorNode *p_node) { particles_editor = memnew( ParticlesEditor ); editor->get_viewport()->add_child(particles_editor); -// particles_editor->set_anchor(MARGIN_LEFT,Control::ANCHOR_END); -// particles_editor->set_anchor(MARGIN_RIGHT,Control::ANCHOR_END); - particles_editor->set_margin(MARGIN_LEFT,253); - particles_editor->set_margin(MARGIN_RIGHT,280); - particles_editor->set_margin(MARGIN_TOP,0); - particles_editor->set_margin(MARGIN_BOTTOM,10); - - particles_editor->hide(); } |
