Added generic button

This commit is contained in:
2022-06-21 14:52:36 +02:00
parent a3a1e900b5
commit 2402567330
8 changed files with 100 additions and 4 deletions
+6
View File
@@ -4,6 +4,7 @@
#include "../sdlpp/sdlpp_visitor.hpp"
#include "../sdlpp/sdlpp_geometry.hpp"
#include "blocks.hpp"
#include "gui/gui.hpp"
#include <memory>
struct VisitorType {
@@ -46,6 +47,9 @@ public:
uint64_t getToolType() const {
return tool_box_type;
}
const Button *getCurButton() {
return cur_button;
}
static bool moveMapLeft(uint64_t flags);
static bool moveMapRight(uint64_t flags);
@@ -55,6 +59,7 @@ public:
static bool moveModsRight(uint64_t flags);
static bool moveCharactersLeft(uint64_t flags);
static bool moveCharactersRight(uint64_t flags);
static bool button(uint64_t flags);
private:
uint64_t select_flags = 0;
@@ -64,6 +69,7 @@ private:
SDLPP::Vec2D<int> tool_box_location = { -1, -1 };
uint64_t _type{};
uint64_t tool_box_type = 0;
const Button *cur_button;
};
class ToolVisitor : public SDLPP::Visitor {