SmartBrushTool class
Paints ground, the tiles are chosen by the tiles around them.
The left button makes cells solid, the right one empty. Every painted cell and its neighbors get the tile the levels of the tile set use the most where the same neighbors are solid (see SmartTileModel) — so painting a block gets it its grass, edges and corners, and painting next to ground joins them. Neighbors with tiles of another tile set, animated ones, and those that are translucent or invisible are kept as they are.
Base classes
- class StrokeTool
- Base of the tools that paint tiles.
Constructors, destructors, conversion operators
- SmartBrushTool(IToolHost& host) explicit
Public functions
- auto GetType() const -> EditorToolType override
- Returns the type.
- void OnActivate() override
- Called when the tool is chosen.
- void OnPointerDown(const ToolPointer& pointer) override
- Called when the pointer is pressed over the view.
- void OnPointerMove(const ToolPointer& pointer) override
- Called when the pointer moves over the view, pressed or not.
- void OnPointerUp(const ToolPointer& pointer) override
- Called when the pointer is released.
- void Cancel() override
- Cancels what the tool is doing.
- void DrawOverlay(Painter& painter, const ToolPointer& hover, bool hoverValid) override
- Draws what the tool shows over the view.
- auto GetHint() const -> StringView override
- Returns a hint of how the tool is used.