- User Interface
- Status Bar
- Game Link
- Export Data
- Built-in Scripts
- API Reference
- Standard Library
- Interface Toolkit
- Technical Reference
Functions to control the undo/redo memory.
GCUndo.MarkBefore( element: string ): void
Mark an undo point by recording the current state of a specific part of the map data before it is modified. Once
GCUndo.MarkBefore is called, the function should not be called again until either
GCUndo.Abort are called.
If the marking fails, the function returns
false. Check for this and do not modify the map.
element string parameter describes what data to record into the undo memory and can be one of:
||Record the state of all color, mono custom tiles and custom tile groups in the map.|
||Record the whole map. Very inefficient and not recommended.|
Note: It is strongly recommended that
GCKernel.SetBlockingMode(true) is called prior to this call, to prevent user actions from generating conflicting undo states.
Mark the successful end of modifications to the previously specified element of map data. After this call, the user will be able to undo back to the state where
GCUndo.MarkBefore was called, and redo back to the point recorded by this
If no modifications were made to the map data after a call to GCUndo.MarkBefore, then this function allows the undo memory to be reverted back to the initial state, rather than generating additional steps in the undo memory.