Now have a timer going with some fancy buttons. Next step a pomodoro time that counts down and if you don't finish your task in that time you take big damage.

This commit is contained in:
Zed A. Shaw 2024-09-24 18:01:51 -04:00
parent 47c9cb719e
commit fff4e0fbee
2 changed files with 22 additions and 7 deletions

View file

@ -29,6 +29,10 @@ constexpr Value BOX_OUTLINE = Value::MID;
constexpr int BOX_THICKNESS=10;
constexpr Value BOX_FILL = Value::TRANSPARENT;
enum class Button {
NONE, START, STOP
};
class SoundQuip {
public:
sf::Sound sound;
@ -51,6 +55,8 @@ class SFMLBackend {
sf::Texture stop_texture;
sf::Sprite start_button;
sf::Texture start_texture;
std::chrono::time_point<std::chrono::system_clock> clock_start;
Button buttons = Button::NONE;
int hit_points = 50;
sf::Font font;
GameEngine &game;