Syntax:
create {stage} in {window} [at {position}] size {size} create {actor} in {stage} [at {position}] size {size} [nocapture] create {actor} in {stage} [at {position}] from {name} [range {first} to {last}] [nocapture] create {actor} in {stage} [at {position}] from {constant image} [and {constant image} ...] [nocapture] create {actor} tracking {actor} [at {position}] from {name} [range {first} to {last}] [nocapture] create {speechbubble} tracking {actor} [at {position}] create {browser} in {window} [at {position}] size {size} create {textbox} in {stage} [at {position}] size {size} [nocapture]
Keyword handler:
linguist.graphics.keyword.GKCreate.class
Runtime handler(s):
linguist.graphics.handler.GHCreateStage.class linguist.graphics.handler.GHCreateActor.class linguist.graphics.handler.GHCreateSpeechBubble.class linguist.graphics.handler.GHCreateBrowser.class
Function:
Creates a stage, an ordinary actor, a speech bubble, a browser or a textbox. In each case, many of the parameters are optional. A tracker is one actor that follows another, so that when one is moved, no extra instructions are needed to move the other. Speech bubbles are usually set to track the actor they belong to. If an actor is not a tracker you must specify which window it belongs to.
A stage is the drawing surface that the actors reside on. If no size is given it defaults to the size of the window it is created in.
An actor can be created with either a blank image or a set of GIF or JPG images that together form a set of views of the actor. (see show). If the images are loaded at runtime they must all share the same root name - see the examples below where the # symbols represent numeric digits. Alternatively an actor can be loaded with one or more constant GIF or JPEG images (see the example). An actor with a blank image is drawable; various commands are available to color and draw in such actors. If you try to draw in a non-drawable actor (one created from a GIF or JPG) an error will result.
A browser is an HTML rendering component using class libraries from ICE Soft. See also show html.
A textbox is a kind of actor that can hold and draw a single line of text. See set for a list cof things you can do with textboxes.
If the optional component [nocapture] is given for an actor or textbox, then the item will not trap mouse events. Although it may still be visible it will act in that respect as if it were transparent.
Example(s):
! stage initialization create MyStage in MainWindow ! actor initialization create Backdrop in MyStage size the size of MyStage create Button1 in MyStage at 20 40 from "gif/Button1_0#" range 0 to 1 create ExitButton in MyStage at 20 40 from EXIT_0 and EXIT_1 ! use constant images create Driver tracking Car at 120 80 from "gif/Driver##" range 1 to 12 ! speechbubble initialization create Bubble tracking Speaker ! browser initialization create TextPanel in MyWindow at 20 20 size 220 340