mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 08:23:29 +00:00
[Scene] Add SceneStringNames::id_pressed
This commit is contained in:
parent
505da68b26
commit
755a0efbb6
72 changed files with 163 additions and 161 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue