< Shapes Index Inventory and objects >

Images

Images are used to visualise scenes, regions, objects, and dialogs. In addition, an image may be used as the form of a region. ADePT supports images of several file types and text areas.

Note: Image files are retrieved from the image path and from resource files as described in the Game item.

Image

Item typeImage
Descriptionan image
Action-
Condition-

KeyTypeDefaultDescription
filefilefile name
positionpoint(0,0)relative position
sizepoint(0,0)size; 0 means original size

Note: If the image file contains transparency, it is displayed with transparency, but the shape of the image is always a rectangle.

Transparent

Item typeTransparent
Descriptiona transparent image
Action-
Condition-

KeyTypeDefaultDescription
filefilefile name
positionpoint(0,0)relative position
sizepoint(0,0)size; 0 means original size
transparentcolour(-)transparency colour
maskfile""transparency mask

Unlike the Image item, the transparency information of Transparent determines the shape as well as the display. If the file type of the image includes transparency information, the attributes transparent and mask are ignored. For the transparency colour, all pixels of that colour will be transparent. If a mask is specified, transparent refers to this mask. The mask must be a bitmap of the same size as the image.

Note: Due to implementation efficiency, for other than true colour images the transparent colour is not a RGB value, but the palette index of the colour has to be used as the red value.

Animation

Animations are sequences of images and sounds that are changed by time. They may be used where-ever still images may be used: in scenes, in the inventory, and for dialogs.

Item typeAnimation
DescriptionA timely sequence of images and sounds.
ActionStarts/stops animation.
ConditionTrue, if animation is running.

KeyTypeDefaultDescription
positionpoint(0,0)relative position
sizepoint(0,0)size of the animation; if this is (0,0), the size of the images is used
images[Images][]the list of images (frames)
offsets[point][]offsets of the images
sounds[PlayAudio][]the list of sounds (frames)
timingTimings<>the timing for the animation (if none, timer resolution is used)
repeatvalue0the number of frames to play (0 for continuous, -1 for stepping)
endActions<>The action to perform, when animation ends.

The lists of images, offsets, and sounds usually have the same length. In any case, the number of images determines the number of frames of the animation. Missing offsets are assumed to be (0,0). The sounds should be short enough to prevent overlapping. Also, they should use the SINGLE_SHOT style to prevent delays when loading the sound.

An animation may contain any image type in its image list, even animations. The animation will not animate any animation image inside of it, but reflect its state, if it is animated otherwise. Use the empty item (<>) for no image and for no sound.

An animation starts the first time with frame 0, then with the next frame after the one at which it was stopped. The timing always starts from the beginning. When the animation is started (continuous animations are started initially) the timing determines when to change to the next frame. An animation runs until it is stopped or until the number of frames are done. A stepping animation changes to the next frame each time the animation is activated and ignores the timing.

The same animation may be used more than once at the same time (e.g. in two regions of the same scene), but all instances will run synchronously.

Text

Item typeText
Descriptiona text area
Action-
Condition-

KeyTypeDefaultDescription
textstringdisplayed text
positionpoint(0,0)relative position
sizepointsize
styleStyle<>style; if no style, the look is used
fontFont<>font; if no font, the font of the look is used
mousebyte0displays text as selected depending on mouse state; see definitions for values
resolveVarbool0if true, integer variables are resolved

Style

Item typeStyle
Descriptionstyle of a Text
Action-
Condition-

KeyTypeDefaultDescription
alignbyte5alignment; see definitions for values
transparentbool1if false, a rectangle with the background colour is drawn around the text
text3dbool13D style
raisedbool0raised 3D style
shadowbool0shadow 3D style
colorLightcolour(-)light / foreground colour; default is the look colour
colorDarkcolour(-)dark / shadow colour; default is the look colour
colorBackcolour(-)background colour; default is the look colour
gap3dint0gap for 3D style

Note: The attributes of the Style item correspond to the parameters of looks. You may use the look editor to have a preview of the style.

Font

Item typeFont
Descriptionfont of a Text
Action-
Condition-

KeyTypeDefaultDescription
namestringfont name
sizeintfont size
boldbool0bold font
italicbool0italic

Note: For each Font item, the font has to be loaded as a system resource. Don't use too many Font items and reuse the same Font item whenever it is possible.

Note: If you use a font that may not be available on other systems, declare it in the key fontFiles of the Game item to let it install by ADePT.