Jazz2::Editor::ToolActions namespace

Actions of the tools and of the selection, and what they do.

Shapes, options of the tile tools (the modifier painted, random flips, the fill and the magic wand), the event placement modes, operations on the selected tiles (invert, grow, shrink, select all of the same tiles, move, mirror, set the modifier), copying and pasting all layers with their events, the weights of a random stamp and the jumps the measure tool shows. Their options are kept with the settings of the editor.

Functions

void Register(IEditorContext& session)
Adds the actions to the actions of the editor and loads the options of the tools.
auto CopyAllLayers(IEditorContext& session) -> bool
Copies the same rectangle of all layers that are shown and not locked with the events in it, returns false if nothing was copied.
auto PasteAllLayers(IEditorContext& session) -> bool
Pastes tiles of several layers with their events, at the pointer or where they were copied, as one step.
auto PlaceLayered(IEditorContext& session, const LayeredStamp& stamp, Vector2i topLeft) -> bool
Places tiles of several layers with their events, the top left corner at a tile of the layer being edited, as one step.
auto GetLayeredClipboard() -> const LayeredStamp&
Returns the tiles of several layers copied last in the editor.
void SetLayeredClipboard(const LayeredStamp& stamp)
Makes tiles of several layers the ones pasted next, see PasteAllLayers().
auto GetCurrentLayerFromSprite(IEditorContext& session) -> std::int32_t
Returns the position of the layer being edited from the sprite layer, see LayeredStamp::Layer::FromSpriteLayer.
auto UsePrefab(IEditorContext& session, const TilePrefab& prefab) -> bool
Uses a prefab: its tiles become the brush, and a prefab with more layers or events is pasted with them next.
auto TakeEventAtPointer(IEditorContext& session) -> bool
Makes the event under the pointer the one the event tool places and puts it in the clipboard, the tool chosen stays, as Ctrl+E of the editors of the original game.
auto PlaceEventAtPointer(IEditorContext& session) -> bool
Places the events the event tool places at the tile under the pointer, replacing the one there, as one step.
auto ChooseEventAtPointer(IEditorContext& session) -> bool
Lets the next event chosen in the list be placed at the tile under the pointer, and be the one placed from then on.
auto PickTileAtPointer(IEditorContext& session, bool withEvent) -> bool
Makes the tile under the pointer the brush, with withEvent with the event there, placed with it on the sprite layer.
auto MirrorSelection(IEditorContext& session, bool horizontal) -> bool
Mirrors the selected tiles, or events, in place, with their flips and the parameters of the events.
auto SetSelectionModifier(IEditorContext& session, TileModifierMode modifier) -> bool
Sets the modifier of the selected tiles, see TileModifierMode.
auto FillSelectionWithEvent(IEditorContext& session) -> bool
Places the event to place on the selected tiles of the sprite layer.
auto SelectSameTiles(IEditorContext& session) -> bool
Selects all tiles of the layer that are like the selected ones, or the one under the pointer.
void ShowStampWeights(IEditorContext& session)
Shows a dialog with how often each tile of the brush is chosen when it paints at random.
auto SelfTest() -> std::int32_t
Tests what the tools do that doesn't need a level, returns the number of problems.