aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-07-03 04:38:39 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-03 04:38:42 +0200
commit837c9a29dc72dc42a160d6777f1935f1f272d072 (patch)
tree1c004cbe910d368425a69e56776282d717423b82 /include
parent13681189d41f3d5c6c132d92b7451fea151fb713 (diff)
Fix being able to submit text while searching, filter not cleared when exiting images view
Diffstat (limited to 'include')
-rw-r--r--include/SearchBar.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/SearchBar.hpp b/include/SearchBar.hpp
index e986368..7a6c483 100644
--- a/include/SearchBar.hpp
+++ b/include/SearchBar.hpp
@@ -12,6 +12,8 @@ namespace QuickMedia {
// Return true to consume the search (clear the search field)
using TextSubmitCallback = std::function<bool(const sf::String &text)>;
+ using TextBeginTypingCallback = std::function<void()>;
+
class SearchBar {
public:
SearchBar(sf::Font &font, sf::Texture &plugin_logo);
@@ -28,6 +30,7 @@ namespace QuickMedia {
TextUpdateCallback onTextUpdateCallback;
TextSubmitCallback onTextSubmitCallback;
+ TextBeginTypingCallback onTextBeginTypingCallback;
int text_autosearch_delay;
private:
sf::Text text;