aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/plugins/rich_text_editor_plugin.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2015-04-18 14:45:29 -0300
committerJuan Linietsky2015-04-18 14:45:29 -0300
commitbedb4f1ab2bb9a41ea046b258f70d15f310fb114 (patch)
tree6f812920a90cf79311e059987c7e4bf139d43a5e /tools/editor/plugins/rich_text_editor_plugin.cpp
parente388d551b72edc2b88a864760418d0c4b86f2916 (diff)
parent5cb4ba24d392b1a58b029b3ca315100b1c1d8a0a (diff)
downloadgodot-bedb4f1ab2bb9a41ea046b258f70d15f310fb114.tar.gz
godot-bedb4f1ab2bb9a41ea046b258f70d15f310fb114.tar.zst
godot-bedb4f1ab2bb9a41ea046b258f70d15f310fb114.zip
Merge pull request #1662 from TheHX/fix_plugins
Fix toolbar menu position(RichText and MultiMesh plugins)
Diffstat (limited to 'tools/editor/plugins/rich_text_editor_plugin.cpp')
-rw-r--r--tools/editor/plugins/rich_text_editor_plugin.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/editor/plugins/rich_text_editor_plugin.cpp b/tools/editor/plugins/rich_text_editor_plugin.cpp
index abc940801..91eb0a788 100644
--- a/tools/editor/plugins/rich_text_editor_plugin.cpp
+++ b/tools/editor/plugins/rich_text_editor_plugin.cpp
@@ -28,6 +28,8 @@
/*************************************************************************/
#include "rich_text_editor_plugin.h"
#include "os/file_access.h"
+#include "canvas_item_editor_plugin.h"
+
void RichTextEditor::_notification(int p_what) {
switch(p_what) {
@@ -100,7 +102,8 @@ void RichTextEditor::edit(Node *p_rich_text) {
RichTextEditor::RichTextEditor() {
options = memnew( MenuButton );
- add_child(options);
+ //add_child(options);
+ CanvasItemEditor::get_singleton()->add_control_to_menu_panel(options);
options->set_area_as_parent_rect();
options->set_text("RichText");
@@ -129,10 +132,10 @@ bool RichTextEditorPlugin::handles(Object *p_object) const {
void RichTextEditorPlugin::make_visible(bool p_visible) {
if (p_visible) {
- rich_text_editor->show();
+ rich_text_editor->options->show();
} else {
- rich_text_editor->hide();
+ rich_text_editor->options->hide();
rich_text_editor->edit(NULL);
}
@@ -149,10 +152,7 @@ RichTextEditorPlugin::RichTextEditorPlugin(EditorNode *p_node) {
rich_text_editor->set_margin(MARGIN_TOP,0);
rich_text_editor->set_margin(MARGIN_BOTTOM,10);
-
- rich_text_editor->hide();
-
-
+ rich_text_editor->options->hide();
}