Button Class & MIT License Added.

This commit is contained in:
2022-11-01 11:36:12 +01:00
parent 39a256cb49
commit cc7dfbc03d
6 changed files with 187 additions and 35 deletions

23
include/GUI.h Normal file
View File

@@ -0,0 +1,23 @@
#ifndef GUI
#defome GUI
#include <SFML/Main.hpp>
class Button {
public:
Button (sf::Image* normal,sf::Image* clicked,std::string,sf::Vector2f location);
void checkClick (sf::Vector2f);
void setState(bool);
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 // GUI