SetLayerTextureCommand class
#include <Jazz2/Editor/Document/Commands.h>
Replaces the texture of its own of a layer, or removes it, see DocumentLayer::
Base classes
- class EditCommand
- Undoable change of a level being edited.
Constructors, destructors, conversion operators
-
SetLayerTextureCommand(const LevelDocument& document,
std::
int32_t layer, SmallVector<std:: uint8_t, 0> texture, String name) - Creates a change from the current texture of the layer to
texture, empty to take its tiles again.
Public functions
- void Do(LevelDocument& document, DocumentChanges& changes) override
- Applies the change to the document, again after it was undone.
- void Undo(LevelDocument& document, DocumentChanges& changes) override
- Reverts the change.
- auto GetName() const -> String override
- Returns the name shown in the history.
-
auto GetMemoryUsage() const -> std::
size_t override - Returns the memory the command takes.