box
Module(s): vncanvas-base, vncanvas-script, canvastext
Description: Set the script box style and attributes. Script box is where the dialogs are displayed.
box, {param} |
Configure the script box using the
specified parameters. There is no need to call this if using the default settings. Parameters are given as {param:value, param:value, ...} |
| Parameter | Attributes and Description |
|---|---|
|
pos:"position_name"
|
Optional, Persistent
Sets the position of the script box.
Valid values are "bottom" (default), "center", "top", "full. BOTTOM - at bottom, size is 3/4 viewport width by 1/4 viewport height. CENTER - at center, size is 3/4 viewport width by 1/4 viewport height. TOP - at top, size is 3/4 viewport width by 1/4 viewport height. FULL - at center, size is 3/4 viewport width by 7/8 viewport height. BALLOON - See 'actor' The default box dimensions can be set in configuration file. |
|
back:"back_style"
|
Optional, Persistent
Specify the background style of the box.
Valid values are "dim" (default), "none", "image". DIM - script box shows a dim box with 50% opacity. NONE - script box has no back style. IMAGE - an image is displayed as a background. The DIM box colors and IMAGE file can be set in configuration file. |
|
align:"left", "center", "right"
|
Optional, Persistent
Sets the text alignment for the box. Default
is "left".
|
|
prompt:"path_to_image_file" or "none"
|
Optional, Persistent
Displays a small image at end of each text to
indicate that a user input (i.e. click) is needed.
|
|
show:boolean (true/false)
|
Optional
Shows or hides the script box. Whenever there's
a new text to be displayed, the script box is automatically shown.
|
The script box is configured as given below.
chapter = [
...
/* An empty dimmed script box is shown at center;
note, no quotes on true */
box, {pos:"center", back:"dim", show:true},
...
/* The script box is hidden */
box, {show:false},
...
/* Adds a prompt and sets position to full,
still with dimmed back but box is not auto-shown
since there are no text to display anyway */
box, {pos:"full", prompt:"images/prompt.png"}
...
];