summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-04-21 12:50:45 +0200
committerGitHub <noreply@github.com>2019-04-21 12:50:45 +0200
commite003324a1ed88b2802920073f6bcfd46e8a6815a (patch)
treebbf113e18d0c003c6b2b032426b631e18c45d70a /editor/plugins
parent03dfac8609c01de4cfc219a5703ece2f2bb6b3f1 (diff)
parentd835738045353d166ed307360a6b2959f9c3e557 (diff)
Merge pull request #28245 from guilhermefelipecgs/open_menu
Small ux improvement
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp6
-rw-r--r--editor/plugins/skeleton_2d_editor_plugin.cpp1
-rw-r--r--editor/plugins/sprite_editor_plugin.cpp1
3 files changed, 8 insertions, 0 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index b2923a1ff2..66f7b932a2 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -4777,6 +4777,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
hb->add_child(snap_config_menu);
snap_config_menu->set_h_size_flags(SIZE_SHRINK_END);
snap_config_menu->set_tooltip(TTR("Snapping Options"));
+ snap_config_menu->set_switch_on_hover(true);
PopupMenu *p = snap_config_menu->get_popup();
p->connect("id_pressed", this, "_popup_callback");
@@ -4828,6 +4829,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
skeleton_menu = memnew(MenuButton);
hb->add_child(skeleton_menu);
skeleton_menu->set_tooltip(TTR("Skeleton Options"));
+ skeleton_menu->set_switch_on_hover(true);
p = skeleton_menu->get_popup();
p->set_hide_on_checkable_item_selection(false);
@@ -4846,8 +4848,10 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
view_menu->set_text(TTR("View"));
hb->add_child(view_menu);
view_menu->get_popup()->connect("id_pressed", this, "_popup_callback");
+ view_menu->set_switch_on_hover(true);
p = view_menu->get_popup();
+ p->set_hide_on_checkable_item_selection(false);
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_grid", TTR("Show Grid"), KEY_G), SHOW_GRID);
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_helpers", TTR("Show Helpers"), KEY_H), SHOW_HELPERS);
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_rulers", TTR("Show Rulers"), KEY_R), SHOW_RULERS);
@@ -4866,6 +4870,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
presets_menu->set_text(TTR("Layout"));
hb->add_child(presets_menu);
presets_menu->hide();
+ presets_menu->set_switch_on_hover(true);
p = presets_menu->get_popup();
p->connect("id_pressed", this, "_popup_callback");
@@ -4923,6 +4928,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
animation_menu->set_text(TTR("Animation"));
animation_hb->add_child(animation_menu);
animation_menu->get_popup()->connect("id_pressed", this, "_popup_callback");
+ animation_menu->set_switch_on_hover(true);
p = animation_menu->get_popup();
diff --git a/editor/plugins/skeleton_2d_editor_plugin.cpp b/editor/plugins/skeleton_2d_editor_plugin.cpp
index ef3e17279c..0ccb60e39e 100644
--- a/editor/plugins/skeleton_2d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_2d_editor_plugin.cpp
@@ -108,6 +108,7 @@ Skeleton2DEditor::Skeleton2DEditor() {
options->get_popup()->add_item(TTR("Make Rest Pose (From Bones)"), MENU_OPTION_MAKE_REST);
options->get_popup()->add_separator();
options->get_popup()->add_item(TTR("Set Bones to Rest Pose"), MENU_OPTION_SET_REST);
+ options->set_switch_on_hover(true);
options->get_popup()->connect("id_pressed", this, "_menu_option");
diff --git a/editor/plugins/sprite_editor_plugin.cpp b/editor/plugins/sprite_editor_plugin.cpp
index fbc72b1396..7642bfaf04 100644
--- a/editor/plugins/sprite_editor_plugin.cpp
+++ b/editor/plugins/sprite_editor_plugin.cpp
@@ -549,6 +549,7 @@ SpriteEditor::SpriteEditor() {
options->get_popup()->add_item(TTR("Convert to Polygon2D"), MENU_OPTION_CONVERT_TO_POLYGON_2D);
options->get_popup()->add_item(TTR("Create CollisionPolygon2D Sibling"), MENU_OPTION_CREATE_COLLISION_POLY_2D);
options->get_popup()->add_item(TTR("Create LightOccluder2D Sibling"), MENU_OPTION_CREATE_LIGHT_OCCLUDER_2D);
+ options->set_switch_on_hover(true);
options->get_popup()->connect("id_pressed", this, "_menu_option");