aboutsummaryrefslogtreecommitdiff
path: root/include/Entry.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-04-21 13:29:01 +0200
committerdec05eba <dec05eba@protonmail.com>2021-04-21 13:29:01 +0200
commit3ac1120fd40b84507c51f867559bd05adff4eecf (patch)
tree32a3d7e037dd0fa07f764e563cfaa304470ad7f1 /include/Entry.hpp
parent0f151afa58c1f725a652eaa4444ce3e2b2509770 (diff)
Use shader for rounded rectangle, improve circle shader
Diffstat (limited to 'include/Entry.hpp')
-rw-r--r--include/Entry.hpp7
1 files changed, 4 insertions, 3 deletions
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 <SFML/Graphics/Text.hpp>
#include <functional>
@@ -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;
};