aboutsummaryrefslogtreecommitdiff
path: root/include/gui
diff options
context:
space:
mode:
Diffstat (limited to 'include/gui')
-rw-r--r--include/gui/Button.hpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/include/gui/Button.hpp b/include/gui/Button.hpp
index ba6997b..2a22a88 100644
--- a/include/gui/Button.hpp
+++ b/include/gui/Button.hpp
@@ -2,12 +2,12 @@
#include "../RoundedRectangle.hpp"
#include <string>
-#include <SFML/Graphics/Text.hpp>
+#include <mglpp/graphics/Text.hpp>
-namespace sf {
+namespace mgl {
class Event;
class Font;
- class RenderTarget;
+ class Window;
class Shader;
}
@@ -19,21 +19,21 @@ namespace QuickMedia {
class Button {
public:
- Button(const std::string &label, sf::Font *font, unsigned int character_size, float width, sf::Shader *rounded_rectangle_shader, float scale = 1.0f);
+ Button(const std::string &label, mgl::Font *font, float width, mgl::Shader *rounded_rectangle_shader, float scale = 1.0f);
- ButtonEvent on_event(sf::Event &event);
- void draw(sf::RenderTarget &target);
+ ButtonEvent on_event(mgl::Event &event);
+ void draw(mgl::Window &target);
- void set_background_color(sf::Color color);
- void set_position(sf::Vector2f pos);
+ void set_background_color(mgl::Color color);
+ void set_position(mgl::vec2f pos);
- sf::Vector2f get_position() const;
+ mgl::vec2f get_position() const;
float get_width() const;
- float get_height() const;
+ float get_height();
private:
- sf::Text label;
+ mgl::Text label;
RoundedRectangle background;
- sf::Color background_color;
+ mgl::Color background_color;
float scale;
bool clicked_inside = false;
};