Jazz2/Editor/Shell/LayerDialogs.h file

Namespaces

namespace Jazz2
Root namespace of Jazz² Resurrection.
namespace Jazz2::Editor

Functions

void ShowResizeLayerDialog(IEditorContext& session)
Shows a dialog to resize the layer being edited.
auto ResizeLayerAsStep(IEditorContext& session, std::int32_t layer, Vector2i size, Vector2i offset, LevelDocument::ResizeFill fill) -> bool
Resizes a layer as one step that can be undone, as the dialog does, see LevelDocument::ResizeLayer().

Function documentation

void ShowResizeLayerDialog(IEditorContext& session)

Shows a dialog to resize the layer being edited.

The new size is chosen with the side the layer grows or shrinks from, and what fills a layer that grows — empty tiles, its edges going on, or the layer repeated.

bool ResizeLayerAsStep(IEditorContext& session, std::int32_t layer, Vector2i size, Vector2i offset, LevelDocument::ResizeFill fill)

Resizes a layer as one step that can be undone, as the dialog does, see LevelDocument::ResizeLayer().

The tile (0, 0) of the layer goes to offset. Its ground lines move with its tiles, and with the sprite layer the events, the water level, the bookmarks and the notes. Shows a message and returns false if the layer can't be that large.