/**
 *  Triangles
 *  Copyright (C) 2016 POSITIVE MENTAL ATTITUDE
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, version 3 of the License.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#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;
};