diff options
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 |