ToolSettings struct
#include <Jazz2/Editor/Tools/EditorTool.h>
Options shared by the tools, kept with the settings of the editor.
Public types
-
enum MeasureArcs : std::
uint8_t { ArcWalk = 0x01, ArcDash = 0x02, ArcDoubleJump = 0x04, ArcCopter = 0x08, ArcAll = 0x0F } - Jumps the measure tool shows, see MeasureArcs.
Public functions
- void NotifyChanged()
- Tells that the options were changed.
- void PlaceEventsAgain()
- Makes the event tool place events again if it only selects them, as an event to place was picked.
-
auto ResolveTile(const TileStamp& stamp,
Vector2i position,
Vector2i origin,
const TileRef& existing,
bool options,
bool onlyEmpty,
TileRef& result,
bool emptyToo = false,
std::
size_t* stampIndex = nullptr) const -> bool - Returns the tile a stamp paints at a position of a layer with these options,
falseif it paints none there.
Public variables
- TileModifierMode Modifier
- Modifier the tile tools paint the tiles with.
- bool ModifierOnly
- Whether the tile tools change only the modifier of the tiles there, not the tiles.
- bool RandomFlipX
- Whether the tiles of a stamp painted at random are flipped horizontally at random too.
- bool RandomFlipY
- Whether the tiles of a stamp painted at random are flipped vertically at random too.
- bool AcrossSeams
- Whether the fill and the magic wand go on across the edges of a layer that repeats.
- bool IgnoreFlips
- Whether the fill and the magic wand take a tile flipped as the same tile.
- bool OnlyEmpty
- Whether the fill and the rectangle paint only tiles that are empty.
- bool WandGlobal
- Whether the magic wand selects all tiles of the layer like the one clicked, not only those joined to it.
- ToolShape Shape
- Shape the shape tool draws.
- EventPlaceMode EventMode
- How the event tool places events.
-
std::
uint8_t ShownArcs - Jumps the measure tool shows, a combination of MeasureArcs.
- bool ArcCollisions
- Whether the jumps of the measure tool stop at solid tiles.
- bool MirrorSwapTeams
- Whether mirroring swaps the teams of events that belong to one.
- Function<void()> OnChanged
- Called when the options are changed by a tool, so they're kept.
Function documentation
bool Jazz2:: Editor:: ToolSettings:: ResolveTile(const TileStamp& stamp,
Vector2i position,
Vector2i origin,
const TileRef& existing,
bool options,
bool onlyEmpty,
TileRef& result,
bool emptyToo = false,
std:: size_t* stampIndex = nullptr) const
Returns the tile a stamp paints at a position of a layer with these options, false if it paints none there.
existing is the tile there now, options whether the options apply, not for erasing, and onlyEmpty whether only empty tiles are painted. The empty tiles of a stamp whose empty tiles are transparent (see TileStamp::emptyToo, as with Shift held. stampIndex, if given, gets the index of the tile of the stamp that is painted, for its event.