XtreemNodes/include/GUI.h

27 lines
573 B
C
Raw Normal View History

2022-11-01 11:36:12 +01:00
#ifndef GUI
2022-11-01 22:07:58 +01:00
#define GUI
#include "Base.h"
2022-11-01 11:36:12 +01:00
#include <SFML/Main.hpp>
2022-11-01 22:07:58 +01:00
#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();
2022-11-01 11:36:12 +01:00
2022-11-01 22:07:58 +01:00
private:
sf::Sprite normal;
sf::Sprite clicked;
sf::Sprite* currentSpr;
sf::String String;
bool current;
2022-11-01 11:36:12 +01:00
};
2022-11-01 22:07:58 +01:00
#endif