SceneEditorRegionPlaceholderEdit

Package: Libraries.Interface.Undo · Inherits from: Libraries.Language.Object, Libraries.Interface.Undo.Edit

The SceneEditorRegionPlaceholderEdit is one step with the placeholder of the Add region and Remove region tools, in the scene editor's undo list: placing it, moving or resizing it, dropping it, or committing it. It keeps the placeholder's rectangle before and after the step, where there may be no placeholder. A commit also keeps the terrain stroke that added or removed the regions, so undoing a commit takes the regions back out, or puts them back, and brings the placeholder back so it can be changed and committed again. If the terrain no longer has a region tool chosen, undo and redo only change the ground; the placeholder is left alone.

Actions

CanRedo()

Returns

boolean

CanUndo()

Sets up the edit with what the step does and the terrain stroke of a commit, or undefined for a step that only changes the placeholder.

Returns

boolean

Create(Libraries.Interface.Controls.Scenes.SceneEditor controller, Libraries.Interface.Controls.Scenes.Items.EditorTerrain terrain, text name, Libraries.Game.Graphics.Worlds.TerrainStrokeEdit strokeEdit)

Sets up the edit with what the step does and the terrain stroke of a commit, or undefined for a step that only changes the placeholder.

Parameters

Dispose()

GetRedoName()

Returns

text

GetUndoName()

Returns

text

Redo()

Sets the placeholder before the step.

SetAfter(boolean shown, integer firstX, integer firstZ, integer lastX, integer lastZ)

Sets the placeholder after the step.

Parameters

  • shown boolean: True if there is a placeholder
  • firstX integer: Its first region location along x
  • firstZ integer: Its first region location along z
  • lastX integer: Its last region location along x
  • lastZ integer: Its last region location along z

SetBefore(boolean shown, integer firstX, integer firstZ, integer lastX, integer lastZ)

Sets the placeholder before the step.

Parameters

  • shown boolean: True if there was a placeholder
  • firstX integer: Its first region location along x
  • firstZ integer: Its first region location along z
  • lastX integer: Its last region location along x
  • lastZ integer: Its last region location along z

Undo()

Sets the placeholder after the step.

Inherited Actions

3 actions from Libraries.Language.Object