summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/editor/editor_help.cpp8
-rw-r--r--tools/editor/editor_help.h3
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp2
3 files changed, 11 insertions, 2 deletions
diff --git a/tools/editor/editor_help.cpp b/tools/editor/editor_help.cpp
index 808199e175..8fd99cc25a 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) {
diff --git a/tools/editor/editor_help.h b/tools/editor/editor_help.h
index b5ee6eca6c..04ac4d35ff 100644
--- a/tools/editor/editor_help.h
+++ b/tools/editor/editor_help.h
@@ -68,7 +68,8 @@ protected:
static void _bind_methods();
public:
- void popup(const String& p_term="");
+ void popup();
+ void popup(const String& p_term);
EditorHelpSearch();
};
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index 65ed420a51..6413ca1269 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -881,7 +881,7 @@ void ScriptEditor::_menu_option(int p_option) {
} break;
case SEARCH_HELP: {
- help_search_dialog->popup("current");
+ help_search_dialog->popup();
} break;
case SEARCH_CLASSES: {