#pragma once #ifndef SNAKE_BUTTON_HXX #define SNAKE_BUTTON_HXX #include #include #include #include class SDLRenderer; class Button final { public: Button(std::string title, int x, int y, int w, int h); void set_pressed(bool pressed); bool is_pressed() const; void render(SDLRenderer& renderer); private: std::string title_; int x_, y_, w_, h_; bool pressed_; std::shared_future up_; std::shared_future down_; std::shared_future font_; }; #endif // SNAKE_BUTTON_HXX