diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-09-14 18:37:00 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-09-14 18:37:34 +0200 |
commit | d6131b8ba482414be76f2478aea90bd7a4a2379b (patch) | |
tree | 9ea48087f0db0d7c956b87d09a93d8b3a335551a /include | |
parent | 6208faf754b76a7c9a806220c97484ea2e9c0a2e (diff) |
Add support for 4chan pass
Diffstat (limited to 'include')
-rw-r--r-- | include/SearchBar.hpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/SearchBar.hpp b/include/SearchBar.hpp index 9efbf9c..ac15a90 100644 --- a/include/SearchBar.hpp +++ b/include/SearchBar.hpp @@ -16,7 +16,7 @@ namespace QuickMedia { class SearchBar { public: - SearchBar(sf::Font &font, sf::Texture &plugin_logo, const std::string &placeholder); + SearchBar(sf::Font &font, sf::Texture *plugin_logo, const std::string &placeholder, bool input_masked = false); void draw(sf::RenderWindow &window, bool draw_shadow = true); void on_event(sf::Event &event); void update(); @@ -27,16 +27,20 @@ namespace QuickMedia { bool is_cursor_at_start_of_line() const; void set_to_autocomplete(); void set_autocomplete_text(const std::string &text); + void set_vertical_position(float vertical_pos); float getBottom() const; float getBottomWithoutShadow() const; + std::string get_text() const; + TextUpdateCallback onTextUpdateCallback; TextSubmitCallback onTextSubmitCallback; TextBeginTypingCallback onTextBeginTypingCallback; AutocompleteRequestCallback onAutocompleteRequestCallback; int text_autosearch_delay; int autocomplete_search_delay; + bool caret_visible; private: void clear_autocomplete_if_text_not_substring(); void clear_autocomplete_if_last_char_not_substr(); @@ -54,6 +58,8 @@ namespace QuickMedia { bool updated_autocomplete; bool draw_logo; bool needs_update; + bool input_masked; + float vertical_pos; sf::Clock time_since_search_update; }; }
\ No newline at end of file |