diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-05-31 14:15:58 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-05-31 14:15:58 +0200 |
commit | ea4db5c3e157f304ccf2e85e2057ba4f82e59755 (patch) | |
tree | b3306a16130b97823579866637ea7fdcf303a506 /editor/plugins/script_editor_plugin.cpp | |
parent | 2e51be35e2dbefd0b7f8a9648c28d01c011003d1 (diff) | |
parent | 755a0efbb66ce40ec7399103b34094e734bf09bf (diff) | |
download | redot-engine-ea4db5c3e157f304ccf2e85e2057ba4f82e59755.tar.gz |
Merge pull request #91949 from AThousandShips/id_pressed_sname
[Scene] Add `SceneStringNames::id_pressed`
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 4812c623c9..de9b6ae15f 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -4038,7 +4038,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) { context_menu = memnew(PopupMenu); add_child(context_menu); - context_menu->connect("id_pressed", callable_mp(this, &ScriptEditor::_menu_option)); + context_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptEditor::_menu_option)); overview_vbox = memnew(VBoxContainer); overview_vbox->set_custom_minimum_size(Size2(0, 90)); @@ -4122,7 +4122,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) { recent_scripts = memnew(PopupMenu); file_menu->get_popup()->add_submenu_node_item(TTR("Open Recent"), recent_scripts, FILE_OPEN_RECENT); - recent_scripts->connect("id_pressed", callable_mp(this, &ScriptEditor::_open_recent_script)); + recent_scripts->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptEditor::_open_recent_script)); _update_recent_scripts(); @@ -4148,7 +4148,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) { theme_submenu->add_shortcut(ED_SHORTCUT("script_editor/import_theme", TTR("Import Theme...")), THEME_IMPORT); theme_submenu->add_shortcut(ED_SHORTCUT("script_editor/reload_theme", TTR("Reload Theme")), THEME_RELOAD); file_menu->get_popup()->add_submenu_node_item(TTR("Theme"), theme_submenu, FILE_THEME); - theme_submenu->connect("id_pressed", callable_mp(this, &ScriptEditor::_theme_option)); + theme_submenu->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptEditor::_theme_option)); theme_submenu->add_separator(); theme_submenu->add_shortcut(ED_SHORTCUT("script_editor/save_theme", TTR("Save Theme")), THEME_SAVE); @@ -4165,7 +4165,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) { file_menu->get_popup()->add_separator(); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/toggle_scripts_panel", TTR("Toggle Scripts Panel"), KeyModifierMask::CMD_OR_CTRL | Key::BACKSLASH), TOGGLE_SCRIPTS_PANEL); - file_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptEditor::_menu_option)); + file_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptEditor::_menu_option)); file_menu->get_popup()->connect("about_to_popup", callable_mp(this, &ScriptEditor::_prepare_file_menu)); file_menu->get_popup()->connect("popup_hide", callable_mp(this, &ScriptEditor::_file_menu_closed)); @@ -4173,7 +4173,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) { script_search_menu->set_text(TTR("Search")); script_search_menu->set_switch_on_hover(true); script_search_menu->set_shortcut_context(this); - script_search_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptEditor::_menu_option)); + script_search_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptEditor::_menu_option)); menu_hb->add_child(script_search_menu); MenuButton *debug_menu_btn = memnew(MenuButton); |