[Scene] Add SceneStringNames::pressed

This commit is contained in:
A Thousand Ships 2024-05-14 09:40:21 +02:00
parent 78cce1954d
commit ee79386f7b
No known key found for this signature in database
GPG key ID: 2033189A662F8BD7
147 changed files with 727 additions and 722 deletions

View file

@ -4148,14 +4148,14 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
site_search = memnew(Button);
site_search->set_flat(true);
site_search->set_text(TTR("Online Docs"));
site_search->connect("pressed", callable_mp(this, &ScriptEditor::_menu_option).bind(SEARCH_WEBSITE));
site_search->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditor::_menu_option).bind(SEARCH_WEBSITE));
menu_hb->add_child(site_search);
site_search->set_tooltip_text(TTR("Open Godot online documentation."));
help_search = memnew(Button);
help_search->set_flat(true);
help_search->set_text(TTR("Search Help"));
help_search->connect("pressed", callable_mp(this, &ScriptEditor::_menu_option).bind(SEARCH_HELP));
help_search->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditor::_menu_option).bind(SEARCH_HELP));
menu_hb->add_child(help_search);
help_search->set_tooltip_text(TTR("Search the reference documentation."));
@ -4163,14 +4163,14 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
script_back = memnew(Button);
script_back->set_flat(true);
script_back->connect("pressed", callable_mp(this, &ScriptEditor::_history_back));
script_back->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditor::_history_back));
menu_hb->add_child(script_back);
script_back->set_disabled(true);
script_back->set_tooltip_text(TTR("Go to previous edited document."));
script_forward = memnew(Button);
script_forward->set_flat(true);
script_forward->connect("pressed", callable_mp(this, &ScriptEditor::_history_forward));
script_forward->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditor::_history_forward));
menu_hb->add_child(script_forward);
script_forward->set_disabled(true);
script_forward->set_tooltip_text(TTR("Go to next edited document."));