diff options
Diffstat (limited to 'include/SearchBar.hpp')
-rw-r--r-- | include/SearchBar.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/SearchBar.hpp b/include/SearchBar.hpp index b2cdf4d..76ad24b 100644 --- a/include/SearchBar.hpp +++ b/include/SearchBar.hpp @@ -1,16 +1,17 @@ #pragma once +#include "RoundedRectangle.hpp" #include <SFML/Graphics/Text.hpp> #include <SFML/Graphics/RectangleShape.hpp> #include <SFML/Graphics/Sprite.hpp> #include <SFML/System/Clock.hpp> -#include "../external/RoundedRectangleShape.hpp" #include <functional> namespace sf { class Font; class RenderWindow; class Event; + class Shader; } namespace QuickMedia { @@ -21,7 +22,7 @@ namespace QuickMedia { class SearchBar { public: - SearchBar(sf::Texture *plugin_logo, const std::string &placeholder, bool input_masked = false); + SearchBar(sf::Texture *plugin_logo, sf::Shader *rounded_rectangle_shader, 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(); @@ -32,7 +33,6 @@ namespace QuickMedia { void set_to_autocomplete(); void set_autocomplete_text(const std::string &text); void set_vertical_position(float vertical_pos); - void set_background_color(sf::Color color); float getBottom() const; float getBottomWithoutShadow() const; @@ -53,7 +53,7 @@ namespace QuickMedia { private: sf::Text text; sf::Text autocomplete_text; - sf::RoundedRectangleShape background; + RoundedRectangle background; sf::RectangleShape background_shadow; sf::RectangleShape shade; sf::RectangleShape caret; |