Undo(type[, id, level, quiet])
type and
optionally id. You need to enable layers in order to use this
function. Hollywood keeps an internal buffer of all graphics
operations it performs, e.g. displaying brush 2. If you want
to remove brush 2 now from the display, just call Undo(#BRUSH,2).
The following types are possible:
#ANIMid from the display
#ARC
#BGPICPART
#BOX
#BRUSHid from the display
#BRUSHPART
#CIRCLE
#ELLIPSE
#LINE
#MERGED:
#PLOT
#POLYGON
#PRINT
#TEXTOBJECTid from the display
#TEXTOUT
#VECTORPATH
#VIDEOid from the display
The optional argument id is only required for types which
use an identifier (#ANIM, #BGPICPART, #BRUSH, #BRUSHPART, #TEXTOBJECT, #VIDEO).
The other types do not require the id argument. Please set id to 0
for the commands.
The level argument specifies the undo level to use. The argument
is optional and defaults to 1. Undo level defines on which level
the object to undo is. For example, if you display brush 3 four
times on the display and now you want to remove the first one
of all brushes 3, you will have to specify a level of 4. To remove
the last one you have to set undo level to 1, which is also the
default. Therefore if level is not explicitly specified or set to
1, Hollywood will undo the object last displayed of the specified
type.
The quiet argument is also optional. If you set it to True, Hollywood
will only remove the specified object from it is internal object lists
but will leave it on the display. If set to False, Hollywood will
also remove it from the screen.
True if object shall only be removed internally but
not from the display (defaults to False)EnableLayers() DisplayBrush(1, #CENTER, #CENTER) WaitLeftMouse Undo(#BRUSH, 1)The above code displays brush 1 in the center of the display, waits for a mouse click and then removes it.
EnableLayers()
Print("Hello ")
Print("This ")
Print("Is ")
Print("An ")
Print("Undo ")
Print("Test!")
WaitLeftMouse
Undo(#PRINT, 0, 6)
Undo(#PRINT, 0, 5)
Undo(#PRINT, 0, 4)
The above code prints "Hello This Is An Undo Test!" on the display,
waits for a mouse click and then removes the texts "Hello", "This"
and "Is" by using the optional level argument of the Undo() command.