Horizon
src
core
tools
tool_place_board_panel.hpp
1
#pragma once
2
#include "core/tool.hpp"
3
4
namespace
horizon {
5
class
ToolPlaceBoardPanel
:
public
ToolBase
{
6
public
:
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,
16
I::CANCEL,
17
I::RMB,
18
I::ROTATE,
19
};
20
}
21
22
private
:
23
const
class
IncludedBoard
*inc_board =
nullptr
;
24
class
BoardPanel
*temp =
nullptr
;
25
void
create_board(
const
Coordi
&c);
26
};
27
}
// namespace horizon
horizon::BoardPanel
Definition:
board_panel.hpp:7
horizon::Coord< int64_t >
horizon::IncludedBoard
Definition:
included_board.hpp:9
horizon::ToolArgs
This is what a Tool receives when the user did something.
Definition:
tool.hpp:23
horizon::ToolBase
Common interface for all Tools.
Definition:
tool.hpp:121
horizon::ToolPlaceBoardPanel
Definition:
tool_place_board_panel.hpp:5
horizon::ToolPlaceBoardPanel::can_begin
bool can_begin() override
Definition:
tool_place_board_panel.cpp:9
horizon::ToolPlaceBoardPanel::begin
ToolResponse begin(const ToolArgs &args) override
Gets called right after the constructor has finished.
Definition:
tool_place_board_panel.cpp:14
horizon::ToolPlaceBoardPanel::update
ToolResponse update(const ToolArgs &args) override
Gets called whenever the user generated some sort of input.
Definition:
tool_place_board_panel.cpp:42
horizon::ToolResponse
To signal back to the core what the Tool did, a Tool returns a ToolResponse.
Definition:
tool.hpp:42
Generated by
1.9.1