diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index 6f858942aa6..50709f9ef5c 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -541,7 +541,7 @@
- Adds a custom [PopupMenu] submenu under [b]Project > Tools >[/b] [param name]. Use [code]remove_tool_menu_item(name)[/code] on plugin clean up to remove the menu.
+ Adds a custom [PopupMenu] submenu under [b]Project > Tools >[/b] [param name]. Use [method remove_tool_menu_item] on plugin clean up to remove the menu.
diff --git a/editor/plugins/animation_blend_space_1d_editor.cpp b/editor/plugins/animation_blend_space_1d_editor.cpp
index 73375e80932..ed1df4b07f6 100644
--- a/editor/plugins/animation_blend_space_1d_editor.cpp
+++ b/editor/plugins/animation_blend_space_1d_editor.cpp
@@ -80,7 +80,7 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref();
- menu->add_submenu_item(TTR("Add Animation"), "animations");
+ menu->add_submenu_item(TTR("Add Animation"), "AddAnimations");
List names;
tree->get_animation_list(&names);
@@ -796,7 +796,6 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
error_label = memnew(Label);
error_panel->add_child(error_label);
- error_label->set_text("hmmm");
menu = memnew(PopupMenu);
add_child(menu);
@@ -804,7 +803,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
animations_menu = memnew(PopupMenu);
menu->add_child(animations_menu);
- animations_menu->set_name("animations");
+ animations_menu->set_name("AddAnimations");
animations_menu->connect("index_pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_add_animation_type));
open_file = memnew(EditorFileDialog);
diff --git a/editor/plugins/animation_blend_space_2d_editor.cpp b/editor/plugins/animation_blend_space_2d_editor.cpp
index 0645d514855..057170098d2 100644
--- a/editor/plugins/animation_blend_space_2d_editor.cpp
+++ b/editor/plugins/animation_blend_space_2d_editor.cpp
@@ -125,7 +125,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref();
ClassDB::get_inheriters_from_class("AnimationRootNode", &classes);
- menu->add_submenu_item(TTR("Add Animation"), "animations");
+ menu->add_submenu_item(TTR("Add Animation"), "AddAnimations");
List names;
tree->get_animation_list(&names);
@@ -1073,7 +1073,6 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
add_child(error_panel);
error_label = memnew(Label);
error_panel->add_child(error_label);
- error_label->set_text("eh");
set_custom_minimum_size(Size2(0, 300 * EDSCALE));
@@ -1083,7 +1082,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
animations_menu = memnew(PopupMenu);
menu->add_child(animations_menu);
- animations_menu->set_name("animations");
+ animations_menu->set_name("AddAnimations");
animations_menu->connect("index_pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_add_animation_type));
open_file = memnew(EditorFileDialog);
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index 746a901a0a1..11b5cd488bd 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -563,7 +563,7 @@ void AnimationNodeStateMachineEditor::_open_menu(const Vector2 &p_position) {
List animation_names;
tree->get_animation_list(&animation_names);
- menu->add_submenu_item(TTR("Add Animation"), "animations");
+ menu->add_submenu_item(TTR("Add Animation"), "AddAnimations");
if (animation_names.is_empty()) {
menu->set_item_disabled(menu->get_item_idx_from_text(TTR("Add Animation")), true);
} else {
@@ -1774,7 +1774,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
animations_menu = memnew(PopupMenu);
menu->add_child(animations_menu);
- animations_menu->set_name("animations");
+ animations_menu->set_name("AddAnimations");
animations_menu->connect("index_pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_add_animation_type));
connect_menu = memnew(PopupMenu);
diff --git a/editor/plugins/debugger_editor_plugin.cpp b/editor/plugins/debugger_editor_plugin.cpp
index b636ec4f5c8..41eae444f79 100644
--- a/editor/plugins/debugger_editor_plugin.cpp
+++ b/editor/plugins/debugger_editor_plugin.cpp
@@ -95,12 +95,12 @@ DebuggerEditorPlugin::DebuggerEditorPlugin(PopupMenu *p_debug_menu) {
// Multi-instance, start/stop
instances_menu = memnew(PopupMenu);
- instances_menu->set_name("run_instances");
+ instances_menu->set_name("RunInstances");
instances_menu->set_hide_on_checkable_item_selection(false);
debug_menu->add_child(instances_menu);
debug_menu->add_separator();
- debug_menu->add_submenu_item(TTR("Run Multiple Instances"), "run_instances");
+ debug_menu->add_submenu_item(TTR("Run Multiple Instances"), "RunInstances");
for (int i = 1; i <= 4; i++) {
instances_menu->add_radio_check_item(vformat(TTRN("Run %d Instance", "Run %d Instances", i), i));
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index d465b9f27a9..8ab35d150e5 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -5120,8 +5120,8 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
display_submenu->add_radio_check_item(TTR("Motion Vectors"), VIEW_DISPLAY_MOTION_VECTORS);
display_submenu->add_radio_check_item(TTR("Internal Buffer"), VIEW_DISPLAY_INTERNAL_BUFFER);
- display_submenu->set_name("display_advanced");
- view_menu->get_popup()->add_submenu_item(TTR("Display Advanced..."), "display_advanced", VIEW_DISPLAY_ADVANCED);
+ display_submenu->set_name("DisplayAdvanced");
+ view_menu->get_popup()->add_submenu_item(TTR("Display Advanced..."), "DisplayAdvanced", VIEW_DISPLAY_ADVANCED);
view_menu->get_popup()->add_separator();
view_menu->get_popup()->add_check_shortcut(ED_SHORTCUT("spatial_editor/view_environment", TTR("View Environment")), VIEW_ENVIRONMENT);
view_menu->get_popup()->add_check_shortcut(ED_SHORTCUT("spatial_editor/view_gizmos", TTR("View Gizmos")), VIEW_GIZMOS);
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 5b67c6d5093..9ed997dca75 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -2238,7 +2238,7 @@ void ScriptTextEditor::_enable_code_editor() {
edit_menu->get_popup()->add_separator();
{
PopupMenu *sub_menu = memnew(PopupMenu);
- sub_menu->set_name("line_menu");
+ sub_menu->set_name("LineMenu");
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/move_up"), EDIT_MOVE_LINE_UP);
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/move_down"), EDIT_MOVE_LINE_DOWN);
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent"), EDIT_INDENT);
@@ -2247,46 +2247,46 @@ void ScriptTextEditor::_enable_code_editor() {
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_comment"), EDIT_TOGGLE_COMMENT);
sub_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
edit_menu->get_popup()->add_child(sub_menu);
- edit_menu->get_popup()->add_submenu_item(TTR("Line"), "line_menu");
+ edit_menu->get_popup()->add_submenu_item(TTR("Line"), "LineMenu");
}
{
PopupMenu *sub_menu = memnew(PopupMenu);
- sub_menu->set_name("folding_menu");
+ sub_menu->set_name("FoldingMenu");
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_fold_line"), EDIT_TOGGLE_FOLD_LINE);
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/fold_all_lines"), EDIT_FOLD_ALL_LINES);
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/unfold_all_lines"), EDIT_UNFOLD_ALL_LINES);
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/create_code_region"), EDIT_CREATE_CODE_REGION);
sub_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
edit_menu->get_popup()->add_child(sub_menu);
- edit_menu->get_popup()->add_submenu_item(TTR("Folding"), "folding_menu");
+ edit_menu->get_popup()->add_submenu_item(TTR("Folding"), "FoldingMenu");
}
edit_menu->get_popup()->add_separator();
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_text_completion_query"), EDIT_COMPLETE);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/trim_trailing_whitespace"), EDIT_TRIM_TRAILING_WHITESAPCE);
{
PopupMenu *sub_menu = memnew(PopupMenu);
- sub_menu->set_name("indent_menu");
+ sub_menu->set_name("IndentMenu");
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_spaces"), EDIT_CONVERT_INDENT_TO_SPACES);
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_tabs"), EDIT_CONVERT_INDENT_TO_TABS);
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/auto_indent"), EDIT_AUTO_INDENT);
sub_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
edit_menu->get_popup()->add_child(sub_menu);
- edit_menu->get_popup()->add_submenu_item(TTR("Indentation"), "indent_menu");
+ edit_menu->get_popup()->add_submenu_item(TTR("Indentation"), "IndentMenu");
}
edit_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
edit_menu->get_popup()->add_separator();
{
PopupMenu *sub_menu = memnew(PopupMenu);
- sub_menu->set_name("convert_case");
+ sub_menu->set_name("ConvertCase");
sub_menu->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_uppercase", TTR("Uppercase"), KeyModifierMask::SHIFT | Key::F4), EDIT_TO_UPPERCASE);
sub_menu->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_lowercase", TTR("Lowercase"), KeyModifierMask::SHIFT | Key::F5), EDIT_TO_LOWERCASE);
sub_menu->add_shortcut(ED_SHORTCUT("script_text_editor/capitalize", TTR("Capitalize"), KeyModifierMask::SHIFT | Key::F6), EDIT_CAPITALIZE);
sub_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
edit_menu->get_popup()->add_child(sub_menu);
- edit_menu->get_popup()->add_submenu_item(TTR("Convert Case"), "convert_case");
+ edit_menu->get_popup()->add_submenu_item(TTR("Convert Case"), "ConvertCase");
}
edit_menu->get_popup()->add_child(highlighter_menu);
- edit_menu->get_popup()->add_submenu_item(TTR("Syntax Highlighter"), "highlighter_menu");
+ edit_menu->get_popup()->add_submenu_item(TTR("Syntax Highlighter"), "HighlighterMenu");
highlighter_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_change_syntax_highlighter));
edit_hb->add_child(search_menu);
@@ -2309,13 +2309,13 @@ void ScriptTextEditor::_enable_code_editor() {
goto_menu->get_popup()->add_separator();
goto_menu->get_popup()->add_child(bookmarks_menu);
- goto_menu->get_popup()->add_submenu_item(TTR("Bookmarks"), "Bookmarks");
+ goto_menu->get_popup()->add_submenu_item(TTR("Bookmarks"), "BookmarksMenu");
_update_bookmark_list();
bookmarks_menu->connect("about_to_popup", callable_mp(this, &ScriptTextEditor::_update_bookmark_list));
bookmarks_menu->connect("index_pressed", callable_mp(this, &ScriptTextEditor::_bookmark_item_pressed));
goto_menu->get_popup()->add_child(breakpoints_menu);
- goto_menu->get_popup()->add_submenu_item(TTR("Breakpoints"), "Breakpoints");
+ goto_menu->get_popup()->add_submenu_item(TTR("Breakpoints"), "BreakpointsMenu");
_update_breakpoint_list();
breakpoints_menu->connect("about_to_popup", callable_mp(this, &ScriptTextEditor::_update_breakpoint_list));
breakpoints_menu->connect("index_pressed", callable_mp(this, &ScriptTextEditor::_breakpoint_item_pressed));
@@ -2378,7 +2378,7 @@ ScriptTextEditor::ScriptTextEditor() {
edit_menu->set_shortcut_context(this);
highlighter_menu = memnew(PopupMenu);
- highlighter_menu->set_name("highlighter_menu");
+ highlighter_menu->set_name("HighlighterMenu");
Ref plain_highlighter;
plain_highlighter.instantiate();
@@ -2400,10 +2400,10 @@ ScriptTextEditor::ScriptTextEditor() {
goto_menu->set_shortcut_context(this);
bookmarks_menu = memnew(PopupMenu);
- bookmarks_menu->set_name("Bookmarks");
+ bookmarks_menu->set_name("BookmarksMenu");
breakpoints_menu = memnew(PopupMenu);
- breakpoints_menu->set_name("Breakpoints");
+ breakpoints_menu->set_name("BreakpointsMenu");
connection_info_dialog = memnew(ConnectionInfoDialog);
diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp
index b0a69cfb5cb..c7945e44f06 100644
--- a/editor/plugins/text_editor.cpp
+++ b/editor/plugins/text_editor.cpp
@@ -662,18 +662,18 @@ TextEditor::TextEditor() {
edit_menu->get_popup()->add_separator();
PopupMenu *convert_case = memnew(PopupMenu);
- convert_case->set_name("convert_case");
+ convert_case->set_name("ConvertCase");
edit_menu->get_popup()->add_child(convert_case);
- edit_menu->get_popup()->add_submenu_item(TTR("Convert Case"), "convert_case");
+ edit_menu->get_popup()->add_submenu_item(TTR("Convert Case"), "ConvertCase");
convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_uppercase", TTR("Uppercase")), EDIT_TO_UPPERCASE);
convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_lowercase", TTR("Lowercase")), EDIT_TO_LOWERCASE);
convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/capitalize", TTR("Capitalize")), EDIT_CAPITALIZE);
convert_case->connect("id_pressed", callable_mp(this, &TextEditor::_edit_option));
highlighter_menu = memnew(PopupMenu);
- highlighter_menu->set_name("highlighter_menu");
+ highlighter_menu->set_name("HighlighterMenu");
edit_menu->get_popup()->add_child(highlighter_menu);
- edit_menu->get_popup()->add_submenu_item(TTR("Syntax Highlighter"), "highlighter_menu");
+ edit_menu->get_popup()->add_submenu_item(TTR("Syntax Highlighter"), "HighlighterMenu");
highlighter_menu->connect("id_pressed", callable_mp(this, &TextEditor::_change_syntax_highlighter));
Ref plain_highlighter;
@@ -696,9 +696,9 @@ TextEditor::TextEditor() {
goto_menu->get_popup()->add_separator();
bookmarks_menu = memnew(PopupMenu);
- bookmarks_menu->set_name("Bookmarks");
+ bookmarks_menu->set_name("BookmarksMenu");
goto_menu->get_popup()->add_child(bookmarks_menu);
- goto_menu->get_popup()->add_submenu_item(TTR("Bookmarks"), "Bookmarks");
+ goto_menu->get_popup()->add_submenu_item(TTR("Bookmarks"), "BookmarksMenu");
_update_bookmark_list();
bookmarks_menu->connect("about_to_popup", callable_mp(this, &TextEditor::_update_bookmark_list));
bookmarks_menu->connect("index_pressed", callable_mp(this, &TextEditor::_bookmark_item_pressed));
diff --git a/editor/plugins/text_shader_editor.cpp b/editor/plugins/text_shader_editor.cpp
index 27f42608c68..3a2ddeb94ec 100644
--- a/editor/plugins/text_shader_editor.cpp
+++ b/editor/plugins/text_shader_editor.cpp
@@ -1152,9 +1152,9 @@ TextShaderEditor::TextShaderEditor() {
goto_menu->get_popup()->add_separator();
bookmarks_menu = memnew(PopupMenu);
- bookmarks_menu->set_name("Bookmarks");
+ bookmarks_menu->set_name("BookmarksMenu");
goto_menu->get_popup()->add_child(bookmarks_menu);
- goto_menu->get_popup()->add_submenu_item(TTR("Bookmarks"), "Bookmarks");
+ goto_menu->get_popup()->add_submenu_item(TTR("Bookmarks"), "BookmarksMenu");
_update_bookmark_list();
bookmarks_menu->connect("about_to_popup", callable_mp(this, &TextShaderEditor::_update_bookmark_list));
bookmarks_menu->connect("index_pressed", callable_mp(this, &TextShaderEditor::_bookmark_item_pressed));
diff --git a/editor/plugins/theme_editor_preview.cpp b/editor/plugins/theme_editor_preview.cpp
index 5dcdd9059ef..9825be9ae88 100644
--- a/editor/plugins/theme_editor_preview.cpp
+++ b/editor/plugins/theme_editor_preview.cpp
@@ -354,8 +354,8 @@ DefaultThemeEditorPreview::DefaultThemeEditorPreview() {
PopupMenu *test_submenu = memnew(PopupMenu);
test_menu_button->get_popup()->add_child(test_submenu);
- test_submenu->set_name("submenu");
- test_menu_button->get_popup()->add_submenu_item(TTR("Submenu"), "submenu");
+ test_submenu->set_name("SubMenu");
+ test_menu_button->get_popup()->add_submenu_item(TTR("Submenu"), "SubMenu");
test_submenu->add_item(TTR("Subitem 1"));
test_submenu->add_item(TTR("Subitem 2"));
first_vb->add_child(test_menu_button);
diff --git a/editor/plugins/version_control_editor_plugin.cpp b/editor/plugins/version_control_editor_plugin.cpp
index 6bac62d8613..2fa54ac1dce 100644
--- a/editor/plugins/version_control_editor_plugin.cpp
+++ b/editor/plugins/version_control_editor_plugin.cpp
@@ -1443,18 +1443,18 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
extra_options_remove_branch_list = memnew(PopupMenu);
extra_options_remove_branch_list->connect(SNAME("id_pressed"), callable_mp(this, &VersionControlEditorPlugin::_popup_branch_remove_confirm));
- extra_options_remove_branch_list->set_name("Remove Branch");
+ extra_options_remove_branch_list->set_name("RemoveBranch");
extra_options->get_popup()->add_child(extra_options_remove_branch_list);
- extra_options->get_popup()->add_submenu_item(TTR("Remove Branch"), "Remove Branch");
+ extra_options->get_popup()->add_submenu_item(TTR("Remove Branch"), "RemoveBranch");
extra_options->get_popup()->add_separator();
extra_options->get_popup()->add_item(TTR("Create New Remote"), EXTRA_OPTION_CREATE_REMOTE);
extra_options_remove_remote_list = memnew(PopupMenu);
extra_options_remove_remote_list->connect(SNAME("id_pressed"), callable_mp(this, &VersionControlEditorPlugin::_popup_remote_remove_confirm));
- extra_options_remove_remote_list->set_name("Remove Remote");
+ extra_options_remove_remote_list->set_name("RemoveRemote");
extra_options->get_popup()->add_child(extra_options_remove_remote_list);
- extra_options->get_popup()->add_submenu_item(TTR("Remove Remote"), "Remove Remote");
+ extra_options->get_popup()->add_submenu_item(TTR("Remove Remote"), "RemoveRemote");
change_type_to_strings[EditorVCSInterface::CHANGE_TYPE_NEW] = TTR("New");
change_type_to_strings[EditorVCSInterface::CHANGE_TYPE_MODIFIED] = TTR("Modified");
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index bd52deedac9..d882c4652d1 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -3056,7 +3056,7 @@ void SceneTreeDock::_add_children_to_popup(Object *p_obj, int p_depth) {
Ref icon = EditorNode::get_singleton()->get_object_icon(obj);
if (menu->get_item_count() == 0) {
- menu->add_submenu_item(TTR("Sub-Resources"), "Sub-Resources");
+ menu->add_submenu_item(TTR("Sub-Resources"), "SubResources");
}
menu_subresources->add_icon_item(icon, E.name.capitalize(), EDIT_SUBRESOURCE_BASE + subresources.size());
menu_subresources->set_item_indent(-1, p_depth);
@@ -4142,7 +4142,7 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
menu->connect("id_pressed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(false));
menu_subresources = memnew(PopupMenu);
- menu_subresources->set_name("Sub-Resources");
+ menu_subresources->set_name("SubResources");
menu_subresources->connect("id_pressed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(false));
menu->add_child(menu_subresources);
diff --git a/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs b/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs
index 6bdf2078730..650afb4cdfe 100644
--- a/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs
@@ -497,7 +497,10 @@ namespace GodotTools
AddChild(new HotReloadAssemblyWatcher { Name = "HotReloadAssemblyWatcher" });
- _menuPopup = new PopupMenu();
+ _menuPopup = new PopupMenu
+ {
+ Name = "CSharpTools",
+ };
_menuPopup.Hide();
AddToolSubmenuItem("C#", _menuPopup);