TileGrid class
#include <Jazz2/Editor/Shell/ShellPanels.h>
Tiles of a tile set to pick the stamp from.
Constructors, destructors, conversion operators
- TileGrid(IEditorContext& session) explicit
Public functions
-
auto GetSource() const -> std::
uint8_t - Returns the source of the tiles, see TileRef::
Source. -
void SetSource(std::
uint8_t source) - Sets the source of the tiles.
-
auto GetColumns() const -> std::
int32_t - Returns the number of tiles in a row, they're as large as the width allows.
-
void SetColumns(std::
int32_t columns) - Sets the number of tiles in a row, it's remembered in the settings.
-
auto GetTileCount() const -> std::
int32_t - Returns the number of tiles of the source.
- auto GetCellUnderPointer(Vector2i& cell) const -> bool
- Returns the cell of the tile under the pointer,
falseif it's over no tile. - void PickBlock(Vector2i from, Vector2i to)
- Makes the tiles between two cells the stamp, as a drag over them does, and paints with them.
- auto Measure(const Context& context, Vector2f available) -> Vector2f override
- void Update(float timeMult) override
- void Draw(Painter& painter) override
- auto AcceptsPointer() const -> bool override
- auto OnPointerDown(const PointerEvent& event) -> bool override
- void OnPointerMove(const PointerEvent& event) override
- void OnPointerUp(const PointerEvent& event, bool inside) override
- void OnPointerCancel() override
- auto DragsAfterHold() const -> bool override
- A finger dragged over the tiles scrolls them, held on a tile it picks a block of them from there.
- auto OnWheel(const PointerEvent& event) -> bool override
- auto GetTooltip(Vector2f pos) const -> StringView override
Public variables
- bool ShowUsage
- Whether how often the level uses each tile is shown, unused tiles darkened.