ToolActions.h file
Namespaces
- namespace Jazz2
- Root namespace of Jazz² Resurrection.
- namespace Jazz2::Editor
- namespace Jazz2::Editor::ToolActions
- Actions of the tools and of the selection, and what they do.
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
falseif 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+Eof 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
withEventwith 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.