diff options
Diffstat (limited to 'tools/editor/editor_help.cpp')
-rw-r--r-- | tools/editor/editor_help.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tools/editor/editor_help.cpp b/tools/editor/editor_help.cpp index 321ac76240..1a009214ac 100644 --- a/tools/editor/editor_help.cpp +++ b/tools/editor/editor_help.cpp @@ -36,6 +36,14 @@ #include "os/keyboard.h" +void EditorHelpSearch::popup() { + popup_centered_ratio(0.6); + if (search_box->get_text()!="") { + search_box->select_all(); + _update_search(); + } + search_box->grab_focus(); +} void EditorHelpSearch::popup(const String& p_term) { @@ -263,7 +271,7 @@ void EditorHelpSearch::_confirmed() { String mdata=ti->get_metadata(0); emit_signal("go_to_help",mdata); - editor->call("_editor_select",3); // in case EditorHelpSearch beeen invoked on top of other editor window + editor->call("_editor_select",EditorNode::EDITOR_SCRIPT); // in case EditorHelpSearch beeen invoked on top of other editor window // go to that hide(); } @@ -1049,7 +1057,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { void EditorHelp::_request_help(const String& p_string) { Error err = _goto_desc(p_string); if (err==OK) { - editor->call("_editor_select",3); + editor->call("_editor_select",EditorNode::EDITOR_SCRIPT); } //100 palabras } @@ -1350,7 +1358,6 @@ void EditorHelp::_notification(int p_what) { // forward->set_icon(get_icon("Forward","EditorIcons")); // back->set_icon(get_icon("Back","EditorIcons")); _update_doc(); - editor->connect("request_help",this,"_request_help"); } break; } @@ -1408,7 +1415,6 @@ void EditorHelp::_bind_methods() { ObjectTypeDB::bind_method("_unhandled_key_input",&EditorHelp::_unhandled_key_input); ObjectTypeDB::bind_method("_search",&EditorHelp::_search); ObjectTypeDB::bind_method("_search_cbk",&EditorHelp::_search_cbk); - ObjectTypeDB::bind_method("_help_callback",&EditorHelp::_help_callback); ADD_SIGNAL(MethodInfo("go_to_help")); |