Start Page » DEMoCap: Drag[en]gine Motion Capture » XML Element Classes » ECBCustomColor
Behavior extending ECBehaviorCustomColor to allow user to edit certain parameters using a gui panel.
See also:
This element behavior can be present multiple times in a BehaviorElement. In this case use a unique identifier to distinguish the individual behavior instances.
Element class properties have the prefix customColor.
or customColor({id}).
if id is not empty.
This behavior has no events.
This behavior adds no conversation commands.
This behavior adds no conversation conditions.
This behavior adds no behavior tree actions.
This behavior adds no behavior tree conditions.
This behavior does not support optional behaviors.
Since DEMoCap Version 1.3
class MyElement extends BehaviorElementClass public var ECBehaviorCustomColor customColor func new() customColor = ECBehaviorCustomColor.new(this, "color1", "Color 1", Color.blue) end end
Using element class supporting adding behaviors the behavior can be added like this (again create an example which creates a valid element class):
<?xml version='1.0' encoding='UTF-8'?> <elementClass name='MyClass' class='GenericBehaviorElement'> <behavior type='ECBehaviorCustomColor'> <!-- set element properties. omit property prefix if used inside behavior tag --> <string name='.name'>Color 1</string> </behavior> <behavior type='ECBCustomColor'> <!-- optional: use custom color with id instead of empty string --> <string name='customColor'>second</string> </behavior> <!-- for adding multiple behaviors use unique identifiers --> <behavior type='ECBCustomColor' id='second'/> </elementClass>