1234567891011121314151617181920212223242526272829 |
- #include "GuiTriangle.hpp"
- /**
- * @class GuiButton
- * @author POSITIVE MENTAL ATTITUDE
- * @date 06/09/16
- * @file Triangle.hpp
- * @brief Not too much swag in this class tbh.
- */
- class GuiButton: public GuiTriangle
- {
- public:
- GuiButton(): GuiTriangle(), _flip(false) {rotate(97.5f); _value = nullptr;}
- void create(const sf::Font& font, std::string caption, bool* value);
- void recreate();
- void click(sf::Vector2i mouseXY);
- void flip(bool val);
- void setPosition(sf::Vector2f position);
- void setPosition(float x, float y);
- void setCharacterSize(unsigned size);
- void setColor(sf::Color color);
- private:
- void draw(sf::RenderTarget& target, sf::RenderStates states) const;
- std::string _string;
- sf::Text _caption;
- bool* _value;
- bool _flip;
- };
|