From 3ac1120fd40b84507c51f867559bd05adff4eecf Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 21 Apr 2021 13:29:01 +0200 Subject: Use shader for rounded rectangle, improve circle shader --- include/Entry.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include/Entry.hpp') diff --git a/include/Entry.hpp b/include/Entry.hpp index 10210f8..02d0a59 100644 --- a/include/Entry.hpp +++ b/include/Entry.hpp @@ -1,7 +1,7 @@ #pragma once #include "Text.hpp" -#include "../external/RoundedRectangleShape.hpp" +#include "RoundedRectangle.hpp" #include #include @@ -9,6 +9,7 @@ namespace sf { class Font; class Event; class RenderWindow; + class Shader; } namespace QuickMedia { @@ -17,7 +18,7 @@ namespace QuickMedia { class Entry { public: - Entry(const std::string &placeholder_text); + Entry(const std::string &placeholder_text, sf::Shader *rounded_rectangle_shader); void process_event(sf::Event &event); void draw(sf::RenderWindow &window); @@ -35,7 +36,7 @@ namespace QuickMedia { private: Text text; float width; - sf::RoundedRectangleShape background; + RoundedRectangle background; sf::Text placeholder; bool mouse_left_inside; }; -- cgit v1.2.3