diff options
Diffstat (limited to 'tools/editor')
36 files changed, 77 insertions, 77 deletions
diff --git a/tools/editor/animation_editor.cpp b/tools/editor/animation_editor.cpp index 3bfcf6ac28..54ef21e681 100644 --- a/tools/editor/animation_editor.cpp +++ b/tools/editor/animation_editor.cpp @@ -3012,7 +3012,7 @@ void AnimationKeyEditor::_notification(int p_what) { tpp->add_item(TTR("In-Out"),TRACK_MENU_SET_ALL_TRANS_INOUT); tpp->add_item(TTR("Out-In"),TRACK_MENU_SET_ALL_TRANS_OUTIN); tpp->set_name(TTR("Transitions")); - tpp->connect("item_pressed",this,"_menu_track"); + tpp->connect("id_pressed",this,"_menu_track"); optimize_dialog->connect("confirmed",this,"_animation_optimize"); menu_track->get_popup()->add_child(tpp); @@ -3986,7 +3986,7 @@ AnimationKeyEditor::AnimationKeyEditor() { menu_add_track = memnew( MenuButton ); hb->add_child(menu_add_track); - menu_add_track->get_popup()->connect("item_pressed",this,"_menu_add_track"); + menu_add_track->get_popup()->connect("id_pressed",this,"_menu_add_track"); menu_add_track->set_tooltip(TTR("Add new tracks.")); move_up_button = memnew( ToolButton ); @@ -4014,7 +4014,7 @@ AnimationKeyEditor::AnimationKeyEditor() { menu_track = memnew( MenuButton ); hb->add_child(menu_track); - menu_track->get_popup()->connect("item_pressed",this,"_menu_track"); + menu_track->get_popup()->connect("id_pressed",this,"_menu_track"); menu_track->set_tooltip(TTR("Track tools")); edit_button = memnew( ToolButton ); @@ -4071,7 +4071,7 @@ AnimationKeyEditor::AnimationKeyEditor() { l->set_pos(Point2(0,3)); // dr_panel->add_child(l);*/ -// menu->get_popup()->connect("item_pressed",this,"_menu_callback"); +// menu->get_popup()->connect("id_pressed",this,"_menu_callback"); hb = memnew( HBoxContainer); @@ -4127,7 +4127,7 @@ AnimationKeyEditor::AnimationKeyEditor() { add_child(type_menu); for(int i=0;i<Variant::VARIANT_MAX;i++) type_menu->add_item(Variant::get_type_name(Variant::Type(i)),i); - type_menu->connect("item_pressed",this,"_create_value_item"); + type_menu->connect("id_pressed",this,"_create_value_item"); VBoxContainer *curve_vb = memnew( VBoxContainer ); curve_vb->set_name(TTR("Transition")); @@ -4166,7 +4166,7 @@ AnimationKeyEditor::AnimationKeyEditor() { track_name->connect("text_entered",this,"_track_name_changed"); track_menu = memnew( PopupMenu ); add_child(track_menu); - track_menu->connect("item_pressed",this,"_track_menu_selected"); + track_menu->connect("id_pressed",this,"_track_menu_selected"); key_editor_tab->hide(); diff --git a/tools/editor/asset_library_editor_plugin.cpp b/tools/editor/asset_library_editor_plugin.cpp index 11eef69638..b4f9337d86 100644 --- a/tools/editor/asset_library_editor_plugin.cpp +++ b/tools/editor/asset_library_editor_plugin.cpp @@ -1418,7 +1418,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) { support->get_popup()->add_check_item(TTR("Testing"),SUPPORT_TESTING); support->get_popup()->set_item_checked(SUPPORT_OFFICIAL,true); support->get_popup()->set_item_checked(SUPPORT_COMMUNITY,true); - support->get_popup()->connect("item_pressed",this,"_support_toggled"); + support->get_popup()->connect("id_pressed",this,"_support_toggled"); ///////// diff --git a/tools/editor/connections_dialog.cpp b/tools/editor/connections_dialog.cpp index ba1298eebc..51747ead3d 100644 --- a/tools/editor/connections_dialog.cpp +++ b/tools/editor/connections_dialog.cpp @@ -421,7 +421,7 @@ ConnectDialog::ConnectDialog() { -// dst_method_list->get_popup()->connect("item_pressed", this,"_dst_method_list_selected"); +// dst_method_list->get_popup()->connect("id_pressed", this,"_dst_method_list_selected"); tree->connect("node_selected", this,"_tree_node_selected"); set_as_toplevel(true); diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 914f06ca5d..72a8473945 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -5771,7 +5771,7 @@ EditorNode::EditorNode() { pm_export->add_separator(); pm_export->add_shortcut(ED_SHORTCUT("editor/convert_to_MeshLibrary", TTR("MeshLibrary..")), FILE_EXPORT_MESH_LIBRARY); pm_export->add_shortcut(ED_SHORTCUT("editor/convert_to_TileSet", TTR("TileSet..")), FILE_EXPORT_TILESET); - pm_export->connect("item_pressed",this,"_menu_option"); + pm_export->connect("id_pressed",this,"_menu_option"); p->add_separator(); p->add_shortcut(ED_SHORTCUT("editor/undo", TTR("Undo"),KEY_MASK_CMD+KEY_Z),EDIT_UNDO,true); @@ -5793,7 +5793,7 @@ EditorNode::EditorNode() { recent_scenes = memnew( PopupMenu ); recent_scenes->set_name("RecentScenes"); p->add_child(recent_scenes); - recent_scenes->connect("item_pressed",this,"_open_recent_scene"); + recent_scenes->connect("id_pressed",this,"_open_recent_scene"); { Control *sp = memnew( Control ); @@ -5850,7 +5850,7 @@ EditorNode::EditorNode() { left_menu_hb->add_child( import_menu ); p=import_menu->get_popup(); - p->connect("item_pressed",this,"_menu_option"); + p->connect("id_pressed",this,"_menu_option"); tool_menu = memnew( MenuButton ); tool_menu->set_tooltip(TTR("Miscellaneous project or scene-wide tools.")); @@ -5860,7 +5860,7 @@ EditorNode::EditorNode() { left_menu_hb->add_child( tool_menu ); p=tool_menu->get_popup(); - p->connect("item_pressed",this,"_menu_option"); + p->connect("id_pressed",this,"_menu_option"); p->add_item(TTR("Orphan Resource Explorer"),TOOLS_ORPHAN_RESOURCES); export_button = memnew( ToolButton ); @@ -5930,7 +5930,7 @@ EditorNode::EditorNode() { native_play_button->set_text("NTV"); menu_hb->add_child(native_play_button); native_play_button->hide(); - native_play_button->get_popup()->connect("item_pressed",this,"_run_in_device"); + native_play_button->get_popup()->connect("id_pressed",this,"_run_in_device"); run_native->connect("native_run",this,"_menu_option",varray(RUN_PLAY_NATIVE)); // VSeparator *s1 = memnew( VSeparator ); @@ -5979,7 +5979,7 @@ EditorNode::EditorNode() { p->set_item_tooltip(p->get_item_count()-1,TTR("When this option is turned on, any changes made to the scene in the editor will be replicated in the running game.\nWhen used remotely on a device, this is more efficient with network filesystem.")); p->add_check_item(TTR("Sync Script Changes"),RUN_RELOAD_SCRIPTS); p->set_item_tooltip(p->get_item_count()-1,TTR("When this option is turned on, any script that is saved will be reloaded on the running game.\nWhen used remotely on a device, this is more efficient with network filesystem.")); - p->connect("item_pressed",this,"_menu_option"); + p->connect("id_pressed",this,"_menu_option"); /* run_settings_button = memnew( ToolButton ); @@ -6053,7 +6053,7 @@ EditorNode::EditorNode() { editor_layouts = memnew( PopupMenu ); editor_layouts->set_name("Layouts"); p->add_child(editor_layouts); - editor_layouts->connect("item_pressed",this,"_layout_menu_option"); + editor_layouts->connect("id_pressed",this,"_layout_menu_option"); p->add_submenu_item(TTR("Editor Layout"), "Layouts"); p->add_shortcut(ED_SHORTCUT("editor/fullscreen_mode",TTR("Toggle Fullscreen"),KEY_MASK_SHIFT|KEY_F11),SETTINGS_TOGGLE_FULLSCREN); @@ -6165,7 +6165,7 @@ EditorNode::EditorNode() { prop_editor_hb->add_child(resource_save_button); resource_save_button->get_popup()->add_item(TTR("Save"),RESOURCE_SAVE); resource_save_button->get_popup()->add_item(TTR("Save As.."),RESOURCE_SAVE_AS); - resource_save_button->get_popup()->connect("item_pressed",this,"_menu_option"); + resource_save_button->get_popup()->connect("id_pressed",this,"_menu_option"); resource_save_button->set_focus_mode(Control::FOCUS_NONE); resource_save_button->set_disabled(true); @@ -6193,7 +6193,7 @@ EditorNode::EditorNode() { editor_history_menu->set_icon( gui_base->get_icon("History","EditorIcons")); prop_editor_hb->add_child(editor_history_menu); editor_history_menu->connect("about_to_show",this,"_prepare_history"); - editor_history_menu->get_popup()->connect("item_pressed",this,"_select_history"); + editor_history_menu->get_popup()->connect("id_pressed",this,"_select_history"); prop_editor_hb = memnew( HBoxContainer ); //again... @@ -6504,11 +6504,11 @@ EditorNode::EditorNode() { - file_menu->get_popup()->connect("item_pressed", this,"_menu_option"); - object_menu->get_popup()->connect("item_pressed", this,"_menu_option"); + file_menu->get_popup()->connect("id_pressed", this,"_menu_option"); + object_menu->get_popup()->connect("id_pressed", this,"_menu_option"); - update_menu->get_popup()->connect("item_pressed", this,"_menu_option"); - settings_menu->get_popup()->connect("item_pressed", this,"_menu_option"); + update_menu->get_popup()->connect("id_pressed", this,"_menu_option"); + settings_menu->get_popup()->connect("id_pressed", this,"_menu_option"); file->connect("file_selected", this,"_dialog_action"); diff --git a/tools/editor/editor_path.cpp b/tools/editor/editor_path.cpp index 191881292f..b359522e4f 100644 --- a/tools/editor/editor_path.cpp +++ b/tools/editor/editor_path.cpp @@ -207,7 +207,7 @@ EditorPath::EditorPath(EditorHistory *p_history) { history=p_history; mouse_over=false; popup = memnew( PopupMenu ); - popup->connect("item_pressed",this,"_popup_select"); + popup->connect("id_pressed",this,"_popup_select"); add_child(popup); diff --git a/tools/editor/editor_run_native.cpp b/tools/editor/editor_run_native.cpp index f41db62787..caa1bf5db7 100644 --- a/tools/editor/editor_run_native.cpp +++ b/tools/editor/editor_run_native.cpp @@ -54,7 +54,7 @@ void EditorRunNative::_notification(int p_what) { Ref<ImageTexture> small_icon = memnew( ImageTexture); small_icon->create_from_image(im); MenuButton *mb = memnew( MenuButton ); - mb->get_popup()->connect("item_pressed",this,"_run_native",varray(E->get())); + mb->get_popup()->connect("id_pressed",this,"_run_native",varray(E->get())); mb->connect("pressed",this,"_run_native",varray(-1, E->get())); mb->set_icon(small_icon); add_child(mb); diff --git a/tools/editor/filesystem_dock.cpp b/tools/editor/filesystem_dock.cpp index cea7a6ec83..021de9aa90 100644 --- a/tools/editor/filesystem_dock.cpp +++ b/tools/editor/filesystem_dock.cpp @@ -160,7 +160,7 @@ void FileSystemDock::_notification(int p_what) { button_hist_next->set_icon( get_icon("Forward","EditorIcons")); button_hist_prev->set_icon( get_icon("Back","EditorIcons")); - file_options->connect("item_pressed",this,"_file_option"); + file_options->connect("id_pressed",this,"_file_option"); button_back->connect("pressed",this,"_go_to_tree",varray(),CONNECT_DEFERRED); diff --git a/tools/editor/plugins/animation_player_editor_plugin.cpp b/tools/editor/plugins/animation_player_editor_plugin.cpp index 7029200b61..726ff57b9b 100644 --- a/tools/editor/plugins/animation_player_editor_plugin.cpp +++ b/tools/editor/plugins/animation_player_editor_plugin.cpp @@ -101,7 +101,7 @@ void AnimationPlayerEditor::_notification(int p_what) { autoplay->set_icon( get_icon("AutoPlay","EditorIcons") ); load_anim->set_icon( get_icon("Folder","EditorIcons") ); save_anim->set_icon(get_icon("Save", "EditorIcons")); - save_anim->get_popup()->connect("item_pressed", this, "_animation_save_menu"); + save_anim->get_popup()->connect("id_pressed", this, "_animation_save_menu"); remove_anim->set_icon( get_icon("Remove","EditorIcons") ); blend_anim->set_icon( get_icon("Blend","EditorIcons") ); @@ -115,7 +115,7 @@ void AnimationPlayerEditor::_notification(int p_what) { resource_edit_anim->set_icon( get_icon("EditResource","EditorIcons") ); pin->set_icon(get_icon("Pin","EditorIcons") ); tool_anim->set_icon(get_icon("Tools","EditorIcons")); - tool_anim->get_popup()->connect("item_pressed",this,"_animation_tool_menu"); + tool_anim->get_popup()->connect("id_pressed",this,"_animation_tool_menu"); blend_editor.next->connect("item_selected", this, "_blend_editor_next_changed"); diff --git a/tools/editor/plugins/animation_tree_editor_plugin.cpp b/tools/editor/plugins/animation_tree_editor_plugin.cpp index 80ededc172..7c6db39841 100644 --- a/tools/editor/plugins/animation_tree_editor_plugin.cpp +++ b/tools/editor/plugins/animation_tree_editor_plugin.cpp @@ -1371,7 +1371,7 @@ AnimationTreeEditor::AnimationTreeEditor() { p->add_separator(); p->add_item(TTR("Clear"),MENU_GRAPH_CLEAR); - p->connect("item_pressed", this,"_add_menu_item"); + p->connect("id_pressed", this,"_add_menu_item"); play_button = memnew(Button); play_button->set_pos(Point2(25,0)); @@ -1407,10 +1407,10 @@ AnimationTreeEditor::AnimationTreeEditor() { master_anim_popup = memnew( PopupMenu ); add_child(master_anim_popup); - master_anim_popup->connect("item_pressed",this,"_master_anim_menu_item"); + master_anim_popup->connect("id_pressed",this,"_master_anim_menu_item"); - node_popup->connect("item_pressed", this,"_node_menu_item"); + node_popup->connect("id_pressed", this,"_node_menu_item"); updating_edit=false; diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp index 00696d4de7..54f1d06a4f 100644 --- a/tools/editor/plugins/canvas_item_editor_plugin.cpp +++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp @@ -3436,7 +3436,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { edit_menu = memnew( MenuButton ); edit_menu->set_text(TTR("Edit")); hb->add_child(edit_menu); - edit_menu->get_popup()->connect("item_pressed", this,"_popup_callback"); + edit_menu->get_popup()->connect("id_pressed", this,"_popup_callback"); PopupMenu *p; p = edit_menu->get_popup(); @@ -3461,7 +3461,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { skeleton_menu->add_separator(); skeleton_menu->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_set_ik_chain", TTR("Make IK Chain")), SKELETON_SET_IK_CHAIN); skeleton_menu->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_clear_ik_chain", TTR("Clear IK Chain")), SKELETON_CLEAR_IK_CHAIN); - skeleton_menu->connect("item_pressed", this,"_popup_callback"); + skeleton_menu->connect("id_pressed", this,"_popup_callback"); /* @@ -3473,7 +3473,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { view_menu = memnew( MenuButton ); view_menu->set_text(TTR("View")); hb->add_child(view_menu); - view_menu->get_popup()->connect("item_pressed", this,"_popup_callback"); + view_menu->get_popup()->connect("id_pressed", this,"_popup_callback"); p = view_menu->get_popup(); @@ -3488,7 +3488,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { anchor_menu = memnew( MenuButton ); anchor_menu->set_text(TTR("Anchor")); hb->add_child(anchor_menu); - anchor_menu->get_popup()->connect("item_pressed", this,"_popup_callback"); + anchor_menu->get_popup()->connect("id_pressed", this,"_popup_callback"); anchor_menu->hide(); //p = anchor_menu->get_popup(); @@ -3534,7 +3534,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { animation_menu = memnew( MenuButton ); animation_menu->set_text(TTR("Animation")); animation_hb->add_child(animation_menu); - animation_menu->get_popup()->connect("item_pressed", this,"_popup_callback"); + animation_menu->get_popup()->connect("id_pressed", this,"_popup_callback"); p = animation_menu->get_popup(); @@ -3571,7 +3571,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { selection_menu = memnew( PopupMenu ); add_child(selection_menu); selection_menu->set_custom_minimum_size(Vector2(100, 0)); - selection_menu->connect("item_pressed", this, "_selection_result_pressed"); + selection_menu->connect("id_pressed", this, "_selection_result_pressed"); selection_menu->connect("popup_hide", this, "_selection_menu_hide"); key_pos=true; diff --git a/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp b/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp index 6ea8e35188..710b9a80c0 100644 --- a/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp +++ b/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp @@ -432,7 +432,7 @@ CollisionPolygon2DEditor::CollisionPolygon2DEditor(EditorNode *p_editor) { options->set_area_as_parent_rect(); options->set_text("Polygon"); //options->get_popup()->add_item("Parse BBCode",PARSE_BBCODE); - options->get_popup()->connect("item_pressed", this,"_menu_option"); + options->get_popup()->connect("id_pressed", this,"_menu_option"); #endif mode = MODE_EDIT; diff --git a/tools/editor/plugins/collision_polygon_editor_plugin.cpp b/tools/editor/plugins/collision_polygon_editor_plugin.cpp index fcf6c401e9..010d6f1a47 100644 --- a/tools/editor/plugins/collision_polygon_editor_plugin.cpp +++ b/tools/editor/plugins/collision_polygon_editor_plugin.cpp @@ -561,7 +561,7 @@ CollisionPolygonEditor::CollisionPolygonEditor(EditorNode *p_editor) { options->set_area_as_parent_rect(); options->set_text("Polygon"); //options->get_popup()->add_item("Parse BBCode",PARSE_BBCODE); - options->get_popup()->connect("item_pressed", this,"_menu_option"); + options->get_popup()->connect("id_pressed", this,"_menu_option"); #endif mode = MODE_EDIT; diff --git a/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp b/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp index a981089cc5..da5c07221e 100644 --- a/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp +++ b/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp @@ -310,7 +310,7 @@ MeshLibraryEditor::MeshLibraryEditor(EditorNode *p_editor) { options->get_popup()->add_item(TTR("Import from Scene"),MENU_OPTION_IMPORT_FROM_SCENE); options->get_popup()->add_item(TTR("Update from Scene"),MENU_OPTION_UPDATE_FROM_SCENE); options->get_popup()->set_item_disabled(options->get_popup()->get_item_index(MENU_OPTION_UPDATE_FROM_SCENE),true); - options->get_popup()->connect("item_pressed", this,"_menu_cbk"); + options->get_popup()->connect("id_pressed", this,"_menu_cbk"); menu=options; editor=p_editor; cd = memnew(ConfirmationDialog); diff --git a/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp b/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp index c5aec62407..c468404f0f 100644 --- a/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp +++ b/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp @@ -468,7 +468,7 @@ LightOccluder2DEditor::LightOccluder2DEditor(EditorNode *p_editor) { options->set_area_as_parent_rect(); options->set_text("Polygon"); //options->get_popup()->add_item("Parse BBCode",PARSE_BBCODE); - options->get_popup()->connect("item_pressed", this,"_menu_option"); + options->get_popup()->connect("id_pressed", this,"_menu_option"); #endif mode = MODE_EDIT; diff --git a/tools/editor/plugins/mesh_instance_editor_plugin.cpp b/tools/editor/plugins/mesh_instance_editor_plugin.cpp index 037dcf22fd..164879c4b8 100644 --- a/tools/editor/plugins/mesh_instance_editor_plugin.cpp +++ b/tools/editor/plugins/mesh_instance_editor_plugin.cpp @@ -241,7 +241,7 @@ MeshInstanceEditor::MeshInstanceEditor() { options->get_popup()->add_separator(); options->get_popup()->add_item(TTR("Create Outline Mesh.."),MENU_OPTION_CREATE_OUTLINE_MESH); - options->get_popup()->connect("item_pressed", this,"_menu_option"); + options->get_popup()->connect("id_pressed", this,"_menu_option"); outline_dialog = memnew( ConfirmationDialog ); outline_dialog->set_title(TTR("Create Outline Mesh")); diff --git a/tools/editor/plugins/multimesh_editor_plugin.cpp b/tools/editor/plugins/multimesh_editor_plugin.cpp index 49c04477a2..d4073bd0c2 100644 --- a/tools/editor/plugins/multimesh_editor_plugin.cpp +++ b/tools/editor/plugins/multimesh_editor_plugin.cpp @@ -333,7 +333,7 @@ MultiMeshEditor::MultiMeshEditor() { options->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("MultiMeshInstance","EditorIcons")); options->get_popup()->add_item(TTR("Populate Surface")); - options->get_popup()->connect("item_pressed", this,"_menu_option"); + options->get_popup()->connect("id_pressed", this,"_menu_option"); populate_dialog = memnew( ConfirmationDialog ); populate_dialog->set_title(TTR("Populate MultiMesh")); diff --git a/tools/editor/plugins/navigation_polygon_editor_plugin.cpp b/tools/editor/plugins/navigation_polygon_editor_plugin.cpp index 5f34d23b64..cefab98e6d 100644 --- a/tools/editor/plugins/navigation_polygon_editor_plugin.cpp +++ b/tools/editor/plugins/navigation_polygon_editor_plugin.cpp @@ -515,7 +515,7 @@ NavigationPolygonEditor::NavigationPolygonEditor(EditorNode *p_editor) { options->set_area_as_parent_rect(); options->set_text("Polygon"); //options->get_popup()->add_item("Parse BBCode",PARSE_BBCODE); - options->get_popup()->connect("item_pressed", this,"_menu_option"); + options->get_popup()->connect("id_pressed", this,"_menu_option"); #endif mode = MODE_EDIT; diff --git a/tools/editor/plugins/particles_2d_editor_plugin.cpp b/tools/editor/plugins/particles_2d_editor_plugin.cpp index aee6b68e3c..331a958518 100644 --- a/tools/editor/plugins/particles_2d_editor_plugin.cpp +++ b/tools/editor/plugins/particles_2d_editor_plugin.cpp @@ -144,7 +144,7 @@ void Particles2DEditorPlugin::_notification(int p_what) { if (p_what==NOTIFICATION_ENTER_TREE) { - menu->get_popup()->connect("item_pressed",this,"_menu_callback"); + menu->get_popup()->connect("id_pressed",this,"_menu_callback"); menu->set_icon(menu->get_popup()->get_icon("Particles2D","EditorIcons")); file->connect("file_selected",this,"_file_selected"); } diff --git a/tools/editor/plugins/particles_editor_plugin.cpp b/tools/editor/plugins/particles_editor_plugin.cpp index f290a453bb..382dc29c61 100644 --- a/tools/editor/plugins/particles_editor_plugin.cpp +++ b/tools/editor/plugins/particles_editor_plugin.cpp @@ -356,7 +356,7 @@ ParticlesEditor::ParticlesEditor() { options->get_popup()->add_item(TTR("Create Emitter From Node"),MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE); options->get_popup()->add_item(TTR("Clear Emitter"),MENU_OPTION_CLEAR_EMISSION_VOLUME); - options->get_popup()->connect("item_pressed", this,"_menu_option"); + options->get_popup()->connect("id_pressed", this,"_menu_option"); emission_dialog = memnew( ConfirmationDialog ); emission_dialog->set_title(TTR("Create Emitter")); diff --git a/tools/editor/plugins/path_2d_editor_plugin.cpp b/tools/editor/plugins/path_2d_editor_plugin.cpp index fdd781b178..4e3a0ab720 100644 --- a/tools/editor/plugins/path_2d_editor_plugin.cpp +++ b/tools/editor/plugins/path_2d_editor_plugin.cpp @@ -624,7 +624,7 @@ Path2DEditor::Path2DEditor(EditorNode *p_editor) { options->set_area_as_parent_rect(); options->set_text("Polygon"); //options->get_popup()->add_item("Parse BBCode",PARSE_BBCODE); - options->get_popup()->connect("item_pressed", this,"_menu_option"); + options->get_popup()->connect("id_pressed", this,"_menu_option"); #endif base_hb = memnew( HBoxContainer ); diff --git a/tools/editor/plugins/polygon_2d_editor_plugin.cpp b/tools/editor/plugins/polygon_2d_editor_plugin.cpp index 88877190e1..1b94b6b1ef 100644 --- a/tools/editor/plugins/polygon_2d_editor_plugin.cpp +++ b/tools/editor/plugins/polygon_2d_editor_plugin.cpp @@ -840,7 +840,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) { options->set_area_as_parent_rect(); options->set_text("Polygon"); //options->get_popup()->add_item("Parse BBCode",PARSE_BBCODE); - options->get_popup()->connect("item_pressed", this,"_menu_option"); + options->get_popup()->connect("id_pressed", this,"_menu_option"); #endif mode = MODE_EDIT; @@ -885,7 +885,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) { uv_menu->get_popup()->add_item(TTR("UV->Polygon"),UVEDIT_UV_TO_POLYGON); uv_menu->get_popup()->add_separator(); uv_menu->get_popup()->add_item(TTR("Clear UV"),UVEDIT_UV_CLEAR); - uv_menu->get_popup()->connect("item_pressed",this,"_menu_option"); + uv_menu->get_popup()->connect("id_pressed",this,"_menu_option"); uv_mode_hb->add_child( memnew( VSeparator )); diff --git a/tools/editor/plugins/rich_text_editor_plugin.cpp b/tools/editor/plugins/rich_text_editor_plugin.cpp index 0817279068..f91af2fa60 100644 --- a/tools/editor/plugins/rich_text_editor_plugin.cpp +++ b/tools/editor/plugins/rich_text_editor_plugin.cpp @@ -110,7 +110,7 @@ RichTextEditor::RichTextEditor() { options->get_popup()->add_item(TTR("Parse BBCode"),PARSE_BBCODE); options->get_popup()->add_item(TTR("Clear"),CLEAR); - options->get_popup()->connect("item_pressed", this,"_menu_option"); + options->get_popup()->connect("id_pressed", this,"_menu_option"); file_dialog = memnew( EditorFileDialog ); add_child(file_dialog); file_dialog->add_filter("*.txt"); diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index 6c305530c5..039b1b3307 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -2128,7 +2128,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/close_docs", TTR("Close Docs")), CLOSE_DOCS); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/close_file", TTR("Close"), KEY_MASK_CMD | KEY_W), FILE_CLOSE); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/close_all", TTR("Close All")), CLOSE_ALL); - file_menu->get_popup()->connect("item_pressed", this,"_menu_option"); + file_menu->get_popup()->connect("id_pressed", this,"_menu_option"); @@ -2137,7 +2137,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { script_search_menu->set_text(TTR("Search")); script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find", TTR("Find.."), KEY_MASK_CMD|KEY_F), HELP_SEARCH_FIND); script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_next", TTR("Find Next"), KEY_F3), HELP_SEARCH_FIND_NEXT); - script_search_menu->get_popup()->connect("item_pressed", this,"_menu_option"); + script_search_menu->get_popup()->connect("id_pressed", this,"_menu_option"); script_search_menu->hide(); @@ -2153,7 +2153,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { debug_menu->get_popup()->add_separator(); //debug_menu->get_popup()->add_check_item("Show Debugger",DEBUG_SHOW); debug_menu->get_popup()->add_check_shortcut(ED_SHORTCUT("debugger/keep_debugger_open", TTR("Keep Debugger Open")), DEBUG_SHOW_KEEP_OPEN); - debug_menu->get_popup()->connect("item_pressed", this,"_menu_option"); + debug_menu->get_popup()->connect("id_pressed", this,"_menu_option"); debug_menu->get_popup()->set_item_disabled( debug_menu->get_popup()->get_item_index(DEBUG_NEXT), true); debug_menu->get_popup()->set_item_disabled( debug_menu->get_popup()->get_item_index(DEBUG_STEP), true ); @@ -2170,7 +2170,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { window_menu->get_popup()->add_item(TTR("Move Left"),WINDOW_MOVE_LEFT,KEY_MASK_CMD|KEY_LEFT); window_menu->get_popup()->add_item(TTR("Move Right"),WINDOW_MOVE_RIGHT,KEY_MASK_CMD|KEY_RIGHT); window_menu->get_popup()->add_separator(); - window_menu->get_popup()->connect("item_pressed", this,"_menu_option"); + window_menu->get_popup()->connect("id_pressed", this,"_menu_option"); #endif diff --git a/tools/editor/plugins/script_text_editor.cpp b/tools/editor/plugins/script_text_editor.cpp index 331e38884b..c634e5c694 100644 --- a/tools/editor/plugins/script_text_editor.cpp +++ b/tools/editor/plugins/script_text_editor.cpp @@ -1273,7 +1273,7 @@ ScriptTextEditor::ScriptTextEditor() { context_menu = memnew(PopupMenu); add_child(context_menu); - context_menu->connect("item_pressed", this, "_edit_option"); + context_menu->connect("id_pressed", this, "_edit_option"); color_panel = memnew(PopupPanel); add_child(color_panel); @@ -1309,7 +1309,7 @@ ScriptTextEditor::ScriptTextEditor() { #endif edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/trim_trailing_whitespace"), EDIT_TRIM_TRAILING_WHITESAPCE); edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/auto_indent"), EDIT_AUTO_INDENT); - edit_menu->get_popup()->connect("item_pressed", this,"_edit_option"); + edit_menu->get_popup()->connect("id_pressed", this,"_edit_option"); edit_menu->get_popup()->add_separator(); edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_breakpoint"), DEBUG_TOGGLE_BREAKPOINT); edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/remove_all_breakpoints"), DEBUG_REMOVE_ALL_BREAKPOINTS); @@ -1329,7 +1329,7 @@ ScriptTextEditor::ScriptTextEditor() { search_menu->get_popup()->add_separator(); search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/contextual_help"), HELP_CONTEXTUAL); - search_menu->get_popup()->connect("item_pressed", this,"_edit_option"); + search_menu->get_popup()->connect("id_pressed", this,"_edit_option"); edit_hb->add_child(edit_menu); diff --git a/tools/editor/plugins/shader_editor_plugin.cpp b/tools/editor/plugins/shader_editor_plugin.cpp index 1760191349..17b10ecd70 100644 --- a/tools/editor/plugins/shader_editor_plugin.cpp +++ b/tools/editor/plugins/shader_editor_plugin.cpp @@ -469,7 +469,7 @@ ShaderEditor::ShaderEditor() { edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/paste", TTR("Paste"), KEY_MASK_CMD|KEY_V), EDIT_PASTE); edit_menu->get_popup()->add_separator(); edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/select_all", TTR("Select All"), KEY_MASK_CMD|KEY_A), EDIT_SELECT_ALL); - edit_menu->get_popup()->connect("item_pressed", this,"_menu_option"); + edit_menu->get_popup()->connect("id_pressed", this,"_menu_option"); search_menu = memnew( MenuButton ); @@ -483,7 +483,7 @@ ShaderEditor::ShaderEditor() { search_menu->get_popup()->add_separator(); // search_menu->get_popup()->add_item("Locate Symbol..",SEARCH_LOCATE_SYMBOL,KEY_MASK_CMD|KEY_K); search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/goto_line", TTR("Goto Line.."), KEY_MASK_CMD|KEY_L), SEARCH_GOTO_LINE); - search_menu->get_popup()->connect("item_pressed", this,"_menu_option"); + search_menu->get_popup()->connect("id_pressed", this,"_menu_option"); goto_line_dialog = memnew(GotoLineDialog); diff --git a/tools/editor/plugins/shader_graph_editor_plugin.cpp b/tools/editor/plugins/shader_graph_editor_plugin.cpp index 90aa0edf30..fa702fc9bb 100644 --- a/tools/editor/plugins/shader_graph_editor_plugin.cpp +++ b/tools/editor/plugins/shader_graph_editor_plugin.cpp @@ -2807,7 +2807,7 @@ void ShaderGraphEditor::_notification(int p_what) { if (addsep) popup->add_separator(); } - popup->connect("item_pressed",this,"_add_node"); + popup->connect("id_pressed",this,"_add_node"); } diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp index d74966f1b9..ef2ea13729 100644 --- a/tools/editor/plugins/spatial_editor_plugin.cpp +++ b/tools/editor/plugins/spatial_editor_plugin.cpp @@ -2423,7 +2423,7 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/focus_origin"), VIEW_CENTER_TO_ORIGIN); 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_selection_with_view"), VIEW_ALIGN_SELECTION_WITH_VIEW); - view_menu->get_popup()->connect("item_pressed",this,"_menu_option"); + view_menu->get_popup()->connect("id_pressed",this,"_menu_option"); preview_camera = memnew( Button ); preview_camera->set_toggle_mode(true); @@ -2440,7 +2440,7 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed selection_menu = memnew( PopupMenu ); add_child(selection_menu); selection_menu->set_custom_minimum_size(Vector2(100, 0)); - selection_menu->connect("item_pressed", this, "_selection_result_pressed"); + selection_menu->connect("id_pressed", this, "_selection_result_pressed"); selection_menu->connect("popup_hide", this, "_selection_menu_hide"); if (p_index==0) { @@ -3907,7 +3907,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { p->add_separator(); p->add_shortcut(ED_SHORTCUT("spatial_editor/transform_dialog", TTR("Transform Dialog..")), MENU_TRANSFORM_DIALOG); - p->connect("item_pressed", this,"_menu_item_pressed"); + p->connect("id_pressed", this,"_menu_item_pressed"); view_menu = memnew( MenuButton ); view_menu->set_text(TTR("View")); @@ -3945,7 +3945,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { p->set_item_checked( p->get_item_index(MENU_VIEW_GRID), true ); - p->connect("item_pressed", this,"_menu_item_pressed"); + p->connect("id_pressed", this,"_menu_item_pressed"); /* REST OF MENU */ diff --git a/tools/editor/plugins/texture_region_editor_plugin.cpp b/tools/editor/plugins/texture_region_editor_plugin.cpp index 8b3de86d47..478442b0c4 100644 --- a/tools/editor/plugins/texture_region_editor_plugin.cpp +++ b/tools/editor/plugins/texture_region_editor_plugin.cpp @@ -818,7 +818,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode* p_editor) for (int i = 0; i < 4; i++) p->set_item_as_checkable(i,true); p->set_item_checked(0,true); - p->connect("item_pressed", this, "_set_snap_mode"); + p->connect("id_pressed", this, "_set_snap_mode"); hb_grid = memnew( HBoxContainer ); hb_tools->add_child(hb_grid); hb_grid->add_child( memnew( VSeparator )); diff --git a/tools/editor/plugins/theme_editor_plugin.cpp b/tools/editor/plugins/theme_editor_plugin.cpp index 2950a3485f..ad0968178b 100644 --- a/tools/editor/plugins/theme_editor_plugin.cpp +++ b/tools/editor/plugins/theme_editor_plugin.cpp @@ -679,7 +679,7 @@ ThemeEditor::ThemeEditor() { add_child(theme_menu); theme_menu->set_pos(Vector2(3,3)*EDSCALE); - theme_menu->get_popup()->connect("item_pressed", this,"_theme_menu_cbk"); + theme_menu->get_popup()->connect("id_pressed", this,"_theme_menu_cbk"); HBoxContainer *main_hb = memnew( HBoxContainer ); @@ -898,7 +898,7 @@ ThemeEditor::ThemeEditor() { type_menu->set_text(".."); add_del_dialog->add_child(type_menu); - type_menu->get_popup()->connect("item_pressed", this,"_type_menu_cbk"); + type_menu->get_popup()->connect("id_pressed", this,"_type_menu_cbk"); l = memnew( Label ); l->set_pos( Point2(200,5)*EDSCALE ); @@ -918,7 +918,7 @@ ThemeEditor::ThemeEditor() { add_del_dialog->add_child(name_menu); name_menu->get_popup()->connect("about_to_show", this,"_name_menu_about_to_show"); - name_menu->get_popup()->connect("item_pressed", this,"_name_menu_cbk"); + name_menu->get_popup()->connect("id_pressed", this,"_name_menu_cbk"); type_select_label= memnew( Label ); type_select_label->set_pos( Point2(400,5)*EDSCALE ); diff --git a/tools/editor/plugins/tile_map_editor_plugin.cpp b/tools/editor/plugins/tile_map_editor_plugin.cpp index 05a352964f..1b3bcb7d2c 100644 --- a/tools/editor/plugins/tile_map_editor_plugin.cpp +++ b/tools/editor/plugins/tile_map_editor_plugin.cpp @@ -1489,7 +1489,7 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) { p->add_shortcut(ED_SHORTCUT("tile_map_editor/duplicate_selection", TTR("Duplicate Selection"), KEY_MASK_CMD+KEY_D), OPTION_DUPLICATE); p->add_shortcut(ED_GET_SHORTCUT("tile_map_editor/erase_selection"), OPTION_ERASE_SELECTION); - p->connect("item_pressed", this, "_menu_option"); + p->connect("id_pressed", this, "_menu_option"); toolbar->add_child(options); diff --git a/tools/editor/plugins/tile_set_editor_plugin.cpp b/tools/editor/plugins/tile_set_editor_plugin.cpp index aae2f5c9bc..34002ee863 100644 --- a/tools/editor/plugins/tile_set_editor_plugin.cpp +++ b/tools/editor/plugins/tile_set_editor_plugin.cpp @@ -240,7 +240,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) { options->get_popup()->add_separator(); options->get_popup()->add_item(TTR("Create from Scene"),MENU_OPTION_CREATE_FROM_SCENE); options->get_popup()->add_item(TTR("Merge from Scene"),MENU_OPTION_MERGE_FROM_SCENE); - options->get_popup()->connect("item_pressed", this,"_menu_cbk"); + options->get_popup()->connect("id_pressed", this,"_menu_cbk"); editor=p_editor; cd = memnew(ConfirmationDialog); add_child(cd); diff --git a/tools/editor/project_settings.cpp b/tools/editor/project_settings.cpp index 456f98d137..41ebaea29d 100644 --- a/tools/editor/project_settings.cpp +++ b/tools/editor/project_settings.cpp @@ -1351,7 +1351,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) { } - popup_platform->get_popup()->connect("item_pressed",this,"_copy_to_platform"); + popup_platform->get_popup()->connect("id_pressed",this,"_copy_to_platform"); get_ok()->set_text(TTR("Close")); set_hide_on_ok(true); @@ -1399,7 +1399,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) { input_editor->connect("button_pressed",this,"_action_button_pressed"); popup_add = memnew( PopupMenu ); add_child(popup_add); - popup_add->connect("item_pressed",this,"_add_item"); + popup_add->connect("id_pressed",this,"_add_item"); press_a_key = memnew( ConfirmationDialog ); press_a_key->set_focus_mode(FOCUS_ALL); diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp index ecae00a63e..1a2749cd95 100644 --- a/tools/editor/property_editor.cpp +++ b/tools/editor/property_editor.cpp @@ -2017,7 +2017,7 @@ CustomPropertyEditor::CustomPropertyEditor() { type_button = memnew( MenuButton ); add_child(type_button); type_button->hide(); - type_button->get_popup()->connect("item_pressed", this,"_type_create_selected"); + type_button->get_popup()->connect("id_pressed", this,"_type_create_selected"); scene_tree = memnew( SceneTreeDialog ); @@ -2039,7 +2039,7 @@ CustomPropertyEditor::CustomPropertyEditor() { menu = memnew(PopupMenu); add_child(menu); - menu->connect("item_pressed",this,"_menu_option"); + menu->connect("id_pressed",this,"_menu_option"); evaluator = NULL; diff --git a/tools/editor/resources_dock.cpp b/tools/editor/resources_dock.cpp index 40876f08b7..c8fa1eda77 100644 --- a/tools/editor/resources_dock.cpp +++ b/tools/editor/resources_dock.cpp @@ -366,7 +366,7 @@ ResourcesDock::ResourcesDock(EditorNode *p_editor) { mb->set_tooltip(TTR("Save Resource")); mb->get_popup()->add_item(TTR("Save Resource"),TOOL_SAVE); mb->get_popup()->add_item(TTR("Save Resource As.."),TOOL_SAVE_AS); - mb->get_popup()->connect("item_pressed",this,"_tool_selected" ); + mb->get_popup()->connect("id_pressed",this,"_tool_selected" ); hbc->add_child( mb ); button_save=mb; @@ -377,7 +377,7 @@ ResourcesDock::ResourcesDock(EditorNode *p_editor) { mb->get_popup()->add_item(TTR("Make Local"),TOOL_MAKE_LOCAL); mb->get_popup()->add_item(TTR("Copy"),TOOL_COPY); mb->get_popup()->add_item(TTR("Paste"),TOOL_PASTE); - mb->get_popup()->connect("item_pressed",this,"_tool_selected" ); + mb->get_popup()->connect("id_pressed",this,"_tool_selected" ); hbc->add_child( mb ); button_tools=mb; diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp index d9d5e82cfd..70195862de 100644 --- a/tools/editor/scene_tree_dock.cpp +++ b/tools/editor/scene_tree_dock.cpp @@ -2013,7 +2013,7 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor,Node *p_scene_root,EditorSelec menu = memnew( PopupMenu ); add_child(menu); - menu->connect("item_pressed",this,"_tool_selected"); + menu->connect("id_pressed",this,"_tool_selected"); first_enter=true; restore_script_editor_on_drag=false; diff --git a/tools/editor/scene_tree_editor.cpp b/tools/editor/scene_tree_editor.cpp index b4c8761fa3..addfd8abf4 100644 --- a/tools/editor/scene_tree_editor.cpp +++ b/tools/editor/scene_tree_editor.cpp @@ -1210,14 +1210,14 @@ SceneTreeEditor::SceneTreeEditor(bool p_label,bool p_can_rename, bool p_can_open instance_menu->add_item(TTR("Discard Instancing"),SCENE_MENU_CLEAR_INSTANCING); instance_menu->add_separator(); instance_menu->add_item(TTR("Open in Editor"),SCENE_MENU_OPEN); - instance_menu->connect("item_pressed",this,"_subscene_option"); + instance_menu->connect("id_pressed",this,"_subscene_option"); add_child(instance_menu); inheritance_menu = memnew( PopupMenu ); inheritance_menu->add_item(TTR("Clear Inheritance"),SCENE_MENU_CLEAR_INHERITANCE); inheritance_menu->add_separator(); inheritance_menu->add_item(TTR("Open in Editor"),SCENE_MENU_OPEN_INHERITED); - inheritance_menu->connect("item_pressed",this,"_subscene_option"); + inheritance_menu->connect("id_pressed",this,"_subscene_option"); add_child(inheritance_menu); |