This commit is contained in:
bMorgan01 2022-03-08 10:18:34 -07:00
parent 54f5313273
commit b49080f675
83 changed files with 2083 additions and 0 deletions

24
Button.h Normal file
View file

@ -0,0 +1,24 @@
//
// Created by Benjamin on 1/25/2022.
//
#ifndef SFML_TEMPLATE_BUTTON_H
#define SFML_TEMPLATE_BUTTON_H
#include <functional>
#include "Sprite.h"
class Button : public Sprite {
public:
explicit Button(const sf::Texture &, const std::function<void()> &);
Button(const sf::Texture &, float, float, float, int, const std::function<void()> &);
void click() override;
void hover() override;
void unHover() override;
protected:
std::function<void()> command;
};
#endif //SFML_TEMPLATE_BUTTON_H