27 lines
599 B
C++
27 lines
599 B
C++
#ifndef GUI
|
|
#define GUI
|
|
#include "Base.h"
|
|
#include <SFML/Main.hpp>
|
|
#include <SFML/Graphics.hpp>
|
|
|
|
class Button
|
|
{
|
|
public:
|
|
Button(sf::Image* normal, sf::Image* clicked, std::string text, Position2D location);
|
|
void checkClick(Position2D);
|
|
void setState(bool state);
|
|
void setText(std::string);
|
|
bool getVar();
|
|
sf::Sprite* getSprite();
|
|
sf::String* getText();
|
|
|
|
private:
|
|
sf::Sprite normal;
|
|
sf::Sprite clicked;
|
|
sf::Sprite* currentSpr;
|
|
sf::String String;
|
|
bool current;
|
|
};
|
|
|
|
#endif
|