Horizon
Loading...
Searching...
No Matches
tool_place_decal.hpp
1#pragma once
2#include "core/tool.hpp"
3
4namespace horizon {
5class ToolPlaceDecal : public ToolBase {
6public:
7 using ToolBase::ToolBase;
8 ToolResponse begin(const ToolArgs &args) override;
9 ToolResponse update(const ToolArgs &args) override;
10 bool can_begin() override;
11 std::set<InToolActionID> get_actions() const override
12 {
13 using I = InToolActionID;
14 return {
15 I::LMB, I::CANCEL, I::RMB, I::ROTATE, I::MIRROR, I::ENTER_SIZE,
16 };
17 }
18
19private:
20 class BoardDecal *temp = nullptr;
21};
22} // namespace horizon
Definition board_decal.hpp:11
This is what a Tool receives when the user did something.
Definition tool_pub.hpp:23
Common interface for all Tools.
Definition tool_pub.hpp:94
Definition tool_place_decal.hpp:5
ToolResponse update(const ToolArgs &args) override
Gets called whenever the user generated some sort of input.
Definition tool_place_decal.cpp:42
bool can_begin() override
Definition tool_place_decal.cpp:10
ToolResponse begin(const ToolArgs &args) override
Gets called right after the constructor has finished.
Definition tool_place_decal.cpp:15
To signal back to the core what the Tool did, a Tool returns a ToolResponse.
Definition tool_pub.hpp:40