init
This commit is contained in:
parent
54f5313273
commit
b49080f675
83 changed files with 2083 additions and 0 deletions
24
Button.h
Normal file
24
Button.h
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue