You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
[Scene] Add SceneStringNames::id_pressed
This commit is contained in:
@@ -5294,8 +5294,8 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
|
||||
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/focus_selection"), VIEW_CENTER_TO_SELECTION);
|
||||
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/align_transform_with_view"), VIEW_ALIGN_TRANSFORM_WITH_VIEW);
|
||||
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/align_rotation_with_view"), VIEW_ALIGN_ROTATION_WITH_VIEW);
|
||||
view_menu->get_popup()->connect("id_pressed", callable_mp(this, &Node3DEditorViewport::_menu_option));
|
||||
display_submenu->connect("id_pressed", callable_mp(this, &Node3DEditorViewport::_menu_option));
|
||||
view_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &Node3DEditorViewport::_menu_option));
|
||||
display_submenu->connect(SceneStringName(id_pressed), callable_mp(this, &Node3DEditorViewport::_menu_option));
|
||||
view_menu->set_disable_shortcuts(true);
|
||||
|
||||
// TODO: Re-evaluate with new OpenGL3 renderer, and implement.
|
||||
@@ -5474,7 +5474,7 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
|
||||
selection_menu = memnew(PopupMenu);
|
||||
add_child(selection_menu);
|
||||
selection_menu->set_min_size(Size2(100, 0) * EDSCALE);
|
||||
selection_menu->connect("id_pressed", callable_mp(this, &Node3DEditorViewport::_selection_result_pressed));
|
||||
selection_menu->connect(SceneStringName(id_pressed), callable_mp(this, &Node3DEditorViewport::_selection_result_pressed));
|
||||
selection_menu->connect("popup_hide", callable_mp(this, &Node3DEditorViewport::_selection_menu_hide));
|
||||
|
||||
if (p_index == 0) {
|
||||
@@ -8640,7 +8640,7 @@ Node3DEditor::Node3DEditor() {
|
||||
p->add_separator();
|
||||
p->add_shortcut(ED_SHORTCUT("spatial_editor/configure_snap", TTR("Configure Snap...")), MENU_TRANSFORM_CONFIGURE_SNAP);
|
||||
|
||||
p->connect("id_pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed));
|
||||
p->connect(SceneStringName(id_pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed));
|
||||
|
||||
view_menu = memnew(MenuButton);
|
||||
view_menu->set_flat(false);
|
||||
@@ -8676,7 +8676,7 @@ Node3DEditor::Node3DEditor() {
|
||||
gizmos_menu = memnew(PopupMenu);
|
||||
gizmos_menu->set_hide_on_checkable_item_selection(false);
|
||||
p->add_submenu_node_item(TTR("Gizmos"), gizmos_menu);
|
||||
gizmos_menu->connect("id_pressed", callable_mp(this, &Node3DEditor::_menu_gizmo_toggled));
|
||||
gizmos_menu->connect(SceneStringName(id_pressed), callable_mp(this, &Node3DEditor::_menu_gizmo_toggled));
|
||||
|
||||
p->add_separator();
|
||||
p->add_check_shortcut(ED_SHORTCUT("spatial_editor/view_origin", TTR("View Origin")), MENU_VIEW_ORIGIN);
|
||||
@@ -8688,7 +8688,7 @@ Node3DEditor::Node3DEditor() {
|
||||
p->set_item_checked(p->get_item_index(MENU_VIEW_ORIGIN), true);
|
||||
p->set_item_checked(p->get_item_index(MENU_VIEW_GRID), true);
|
||||
|
||||
p->connect("id_pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed));
|
||||
p->connect(SceneStringName(id_pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed));
|
||||
|
||||
/* REST OF MENU */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user