vsTASKER 7 User Manual
×
Menu
Index

Properties

 
Properties
1

Name

1. Name
Name of the Switch. Must be unique whatever its type.
vsTASKER will generate a class whose name will be <Name>_Spt. For the moment, this class will inherit from Vt_Sprite class.
Any Sprite can be accessed using its name in a generated union named s.
 
2

Style

2. Style
Specify its behavior:
 
  • Toggle: change from one state to one another, according to the number of areas. db->selected will hold the area id selected.
  • Push Button: the texture is one only area. Pressing down mouse button on the area calls the runtime code with db->selected == 0. Do set(1) or more according to any other condition. When mouse button is depressed, set(0) is automatically called (and the corresponding texture displayed).
 
3

Areas

3.
Set here the number of areas that can be selected for the Switch.
For a press button, use 1 area (full) then change the texture from 0/down to 1/up at each press.
 
4

Aspect

4.
Chose here if the areas have to be horizontally or vertically aligned.
 
5

Visual Aspect

5. Visual Aspect
Call the Visual Aspect definition window.
 
6

Caption

6. Caption
Call the (optional) Label definition window to format the text that can appear below the Switch.
 
7

Textures

7. Textures
List all loaded textures that will be displayed upon a set() command.
The first number (id) is the one to be given to the command (at runtime).
For i.e, on the above list, to select the switch_off, put in the code: set(1);
 
8

Import /Export

8.
Not available yet.
 
9

Definitions

9. Definitions
Put here all the local variables needed for this specific Switch runtime code.
 
10

Initialization

10. Initialization
Initialize here (mostly in RESET part) all the variables defined in Definition section.
Default set() can also be used here for putting the Switch in a specific state.
 
11

Runtime

11. Runtime
The runtime code is called every time an area is selected by the mouse.
Use get() to retrieve the actual value of the Switch according to its state.