From d6131b8ba482414be76f2478aea90bd7a4a2379b Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 14 Sep 2020 18:37:00 +0200 Subject: Add support for 4chan pass --- include/SearchBar.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') 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 -- cgit v1.2.3