Merge pull request #2906 from neikeq/help_last_search
Remember last search help term
This commit is contained in:
commit
36ef5cd7bc
3 changed files with 11 additions and 2 deletions
|
@ -36,6 +36,14 @@
|
||||||
|
|
||||||
#include "os/keyboard.h"
|
#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) {
|
void EditorHelpSearch::popup(const String& p_term) {
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,8 @@ protected:
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void popup(const String& p_term="");
|
void popup();
|
||||||
|
void popup(const String& p_term);
|
||||||
|
|
||||||
EditorHelpSearch();
|
EditorHelpSearch();
|
||||||
};
|
};
|
||||||
|
|
|
@ -881,7 +881,7 @@ void ScriptEditor::_menu_option(int p_option) {
|
||||||
} break;
|
} break;
|
||||||
case SEARCH_HELP: {
|
case SEARCH_HELP: {
|
||||||
|
|
||||||
help_search_dialog->popup("current");
|
help_search_dialog->popup();
|
||||||
} break;
|
} break;
|
||||||
case SEARCH_CLASSES: {
|
case SEARCH_CLASSES: {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue