1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Automatically start searching in the asset library when entering text

Entering text will now start searching automatically after 0.25 seconds
have passed (debounce delay).

This removes the need for a separate Search button.

(cherry picked from commit 6055db2a72)
This commit is contained in:
Hugo Locurcio
2020-09-29 12:43:38 +02:00
committed by Rémi Verschelde
parent 7840a550b5
commit f7ed1f4d1f
2 changed files with 18 additions and 7 deletions

View File

@@ -186,10 +186,10 @@ class EditorAssetLibrary : public PanelContainer {
Label *library_loading;
Label *library_error;
LineEdit *filter;
Timer *filter_debounce_timer;
OptionButton *categories;
OptionButton *repository;
OptionButton *sort;
Button *search;
HBoxContainer *error_hb;
TextureRect *error_tr;
Label *error_label;
@@ -284,10 +284,12 @@ class EditorAssetLibrary : public PanelContainer {
void _search(int p_page = 0);
void _rerun_search(int p_ignore);
void _search_text_changed(const String &p_text = "");
void _search_text_entered(const String &p_text = "");
void _api_request(const String &p_request, RequestType p_request_type, const String &p_arguments = "");
void _http_request_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data);
void _http_download_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data);
void _filter_debounce_timer_timeout();
void _repository_changed(int p_repository_id);
void _support_toggled(int p_support);