| < Shapes | Index | Inventory and objects > |
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.
| Item type | Image |
|---|---|
| Description | an image |
| Action | - |
| Condition | - |
| Key | Type | Default | Description |
|---|---|---|---|
| file | file | file name | |
| position | point | (0,0) | relative position |
| size | point | (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.
| Item type | Transparent |
|---|---|
| Description | a transparent image |
| Action | - |
| Condition | - |
| Key | Type | Default | Description |
|---|---|---|---|
| file | file | file name | |
| position | point | (0,0) | relative position |
| size | point | (0,0) | size; 0 means original size |
| transparent | colour | (-) | transparency colour |
| mask | file | "" | 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.
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 type | Animation |
|---|---|
| Description | A timely sequence of images and sounds. |
| Action | Starts/stops animation. |
| Condition | True, if animation is running. |
| Key | Type | Default | Description |
|---|---|---|---|
| position | point | (0,0) | relative position |
| size | point | (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) |
| timing | Timings | <> | the timing for the animation (if none, timer resolution is used) |
| repeat | value | 0 | the number of frames to play (0 for continuous, -1 for stepping) |
| end | Actions | <> | 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.
| Item type | Text |
|---|---|
| Description | a text area |
| Action | - |
| Condition | - |
| Key | Type | Default | Description |
|---|---|---|---|
| text | string | displayed text | |
| position | point | (0,0) | relative position |
| size | point | size | |
| style | Style | <> | style; if no style, the look is used |
| font | Font | <> | font; if no font, the font of the look is used |
| mouse | byte | 0 | displays text as selected depending on mouse state; see definitions for values |
| resolveVar | bool | 0 | if true, integer variables are resolved |
| Item type | Style |
|---|---|
| Description | style of a Text |
| Action | - |
| Condition | - |
| Key | Type | Default | Description |
|---|---|---|---|
| align | byte | 5 | alignment; see definitions for values |
| transparent | bool | 1 | if false, a rectangle with the background colour is drawn around the text |
| text3d | bool | 1 | 3D style |
| raised | bool | 0 | raised 3D style |
| shadow | bool | 0 | shadow 3D style |
| colorLight | colour | (-) | light / foreground colour; default is the look colour |
| colorDark | colour | (-) | dark / shadow colour; default is the look colour |
| colorBack | colour | (-) | background colour; default is the look colour |
| gap3d | int | 0 | gap 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.
| Item type | Font |
|---|---|
| Description | font of a Text |
| Action | - |
| Condition | - |
| Key | Type | Default | Description |
|---|---|---|---|
| name | string | font name | |
| size | int | font size | |
| bold | bool | 0 | bold font |
| italic | bool | 0 | italic |
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.