summaryrefslogtreecommitdiff
path: root/editor/plugins/debugger_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/debugger_editor_plugin.cpp')
-rw-r--r--editor/plugins/debugger_editor_plugin.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/editor/plugins/debugger_editor_plugin.cpp b/editor/plugins/debugger_editor_plugin.cpp
index 28151800b6..224d221d9a 100644
--- a/editor/plugins/debugger_editor_plugin.cpp
+++ b/editor/plugins/debugger_editor_plugin.cpp
@@ -97,14 +97,10 @@ DebuggerEditorPlugin::DebuggerEditorPlugin(PopupMenu *p_debug_menu) {
debug_menu->add_separator();
debug_menu->add_submenu_item(TTR("Run Multiple Instances"), "run_instances");
- instances_menu->add_radio_check_item(TTR("Run 1 Instance"));
- instances_menu->set_item_metadata(0, 1);
- instances_menu->add_radio_check_item(TTR("Run 2 Instances"));
- instances_menu->set_item_metadata(1, 2);
- instances_menu->add_radio_check_item(TTR("Run 3 Instances"));
- instances_menu->set_item_metadata(2, 3);
- instances_menu->add_radio_check_item(TTR("Run 4 Instances"));
- instances_menu->set_item_metadata(3, 4);
+ for (int i = 1; i <= 4; i++) {
+ instances_menu->add_radio_check_item(vformat(TTRN("Run %d Instance", "Run %d Instances", i), i));
+ instances_menu->set_item_metadata(i - 1, i);
+ }
instances_menu->set_item_checked(0, true);
instances_menu->connect("index_pressed", callable_mp(this, &DebuggerEditorPlugin::_select_run_count));
debug_menu->connect("id_pressed", callable_mp(this, &DebuggerEditorPlugin::_menu_option));