Variables are configured in the Variables-view (main menu Project
>
Browse Variables
or toolbar icon).
Named Values:
Variables are part of the logic layer of the CBA ItemBuilder and most often used together with Conditional Links or Finite-State Machines.
INTEGER
, NUMBER
, STRING
or BOOLEAN
) and a default Value.INTEGER
variables (i.e., numbers without decimal places) are typically used.Variables and (Map-Based) Variable Displays are used for many purposes, for instance, to implement Drag-and-Drop response formats.
What can change values of variables?
How are values of variables used?
Layout Options
Link Variable
VariableValueDisplays
are linked to a variable using Context MenuX
/Y
) and size (Width
/Height
)For item development, the Preview provides the State Machine Debug Window that lists (beyond other things) the current value of variables.
During Preview:
Value of variables can be debugged in the Preview
Strg/Ctrl + M is the (default) hotkey for the State-Machine Debugger
Settings (main menu Utilities
>
Open preferences
)
Value Maps are used to translate numeric values (or ranges) into Text, Images, Video and/or Audio.
*
) and can use Texts or refer to resources (Images, Audio, Video from the Resource Browser).Layout Options for Value Display Type TEXT
Link Value Map (& Variable)
MapBasedVariableDisplays
are similar to VariableValueDisplays
, but are linked to a Variable and to a Map.*
is used last).By default, MapBasedVariableDisplays
show the Text of the linked Value Map. If Images, Audio or Video should be used, change the property Value Display Type
in the Properties-view.
Configuration in the Properties-View:
MapBasedVariableDisplays
can be Linked to Events and work as interactive buttons or to display text information or, images.MapBasedVariableDisplays
can also be used as multimedia-player.The CBA ItemBuilder supports two drag-and-drop concepts, but fixed drag-and-drop is used more often.
Example:
Panel
).Simple Illustration
Variables
V_1
)V_2
)V_3
)Values Map
Value | Image |
---|---|
2 | |
3 | |
4 |
The property Drop Mode of MapBasedVariableDisplays
defines the drag-and-drop behavior.
DROP_SWITCH
: The source variable and the target variable switch valuesDROP_MOVE
: The value of the source variable is moved to the target variable (and the source variable becomes zero)DROP_COPY
: The value of the source variable is copied to the target variable (but the source variable keeps the value)Defining a first MapBasedVariableDisplay
:
Link Variable
/ Value Map
).Value Display Type
(if not TEXT
).Configure if a drag-and-drop operation can…
Drag Source: true
)Drop Target: true
)Configure how variable values are changed:
Drop mode
(DROP_COPY
, DROP_MOVE
or DROP_SWITCH
)Duplicate the configured component.
How to Create Groups?
Problem
By default, drag-and-drop is possible across all components of type MapBasedVariableDisplays
.
This is not always what’s needed.
Solution:
Important:
MapBasedVariableDisplays
are introduced here for drag-and-droop, but the components can also used as buttons or to display information.Helpful to remember:
Project
>
Browse Variables
.Project
>
Browse Value Maps
.Drop Mode
.Additional tips: