aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/plugins/sprite_frames_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/sprite_frames_editor_plugin.cpp
parent72fcb8a35beab251d01864bc67da3e3a8e75aed6 (diff)
downloadgodot-74a48a0140262ebd3a818a75b7d102cf0fe2eeae.tar.gz
godot-74a48a0140262ebd3a818a75b7d102cf0fe2eeae.tar.zst
godot-74a48a0140262ebd3a818a75b7d102cf0fe2eeae.zip
Diffstat (limited to 'tools/editor/plugins/sprite_frames_editor_plugin.cpp')
-rw-r--r--tools/editor/plugins/sprite_frames_editor_plugin.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/tools/editor/plugins/sprite_frames_editor_plugin.cpp b/tools/editor/plugins/sprite_frames_editor_plugin.cpp
index 048df2d68..af73828b6 100644
--- a/tools/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/tools/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -485,11 +485,15 @@ bool SpriteFramesEditorPlugin::handles(Object *p_object) const {
void SpriteFramesEditorPlugin::make_visible(bool p_visible) {
if (p_visible) {
- frames_editor->show();
+ button->show();
+ editor->make_bottom_panel_item_visible(frames_editor);
// frames_editor->set_process(true);
} else {
- frames_editor->hide();
+ button->hide();
+ if (frames_editor->is_visible())
+ editor->hide_bottom_panel();
+
// frames_editor->set_process(false);
}
@@ -499,11 +503,9 @@ SpriteFramesEditorPlugin::SpriteFramesEditorPlugin(EditorNode *p_node) {
editor=p_node;
frames_editor = memnew( SpriteFramesEditor );
- editor->get_viewport()->add_child(frames_editor);
- frames_editor->set_area_as_parent_rect();
-// frames_editor->set_anchor( MARGIN_TOP, Control::ANCHOR_END);
-// frames_editor->set_margin( MARGIN_TOP, 120 );
- frames_editor->hide();
+ frames_editor->set_custom_minimum_size(Size2(0,300));
+ button=editor->add_bottom_panel_item("SpriteFrames",frames_editor);
+ button->hide();