summaryrefslogtreecommitdiffstats
path: root/client/SDL/dialogs/sdl_button.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'client/SDL/dialogs/sdl_button.hpp')
-rw-r--r--client/SDL/dialogs/sdl_button.hpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/client/SDL/dialogs/sdl_button.hpp b/client/SDL/dialogs/sdl_button.hpp
new file mode 100644
index 0000000..350e7db
--- /dev/null
+++ b/client/SDL/dialogs/sdl_button.hpp
@@ -0,0 +1,26 @@
+#pragma once
+
+#include <string>
+
+#include "sdl_widget.hpp"
+
+class SdlButton : public SdlWidget
+{
+ public:
+ SdlButton(SDL_Renderer* renderer, const std::string& label, int id, const SDL_Rect& rect);
+ SdlButton(SdlButton&& other) noexcept;
+ ~SdlButton() override = default;
+
+ bool highlight(SDL_Renderer* renderer);
+ bool mouseover(SDL_Renderer* renderer);
+ bool update(SDL_Renderer* renderer);
+
+ [[nodiscard]] int id() const;
+
+ private:
+ SdlButton(const SdlButton& other) = delete;
+
+ private:
+ std::string _name;
+ int _id;
+};