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:
parent
47c9cb719e
commit
fff4e0fbee
2 changed files with 22 additions and 7 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue