Merge pull request #28245 from guilhermefelipecgs/open_menu
Small ux improvement
This commit is contained in:
commit
e003324a1e
3 changed files with 8 additions and 0 deletions
|
@ -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();
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in a new issue