PARAM_ANIMATOR
This element is a wrapper to a parameter object. It can animate this parameter over time, based on the wrapper value changes. It is an easy way to create animations in a user interface: the wrapper continuously forwards the changes made to its value with a delay that can be specified.
The PARAM_ANIMATOR wrapper has the exact same characteristics (type, min/max/default values, unit...) as the parameter object that it wraps, and they cannot be modified.
Attributes brief detailed show all inherited
Examples
You can animate (change smoothly) another parameter or maybe an attribute of a widget, like in the example below.
- <COLUMN spacing="10" >
- <!-- this animator will smoothly change demo_text.opacity value -->
- <PARAM_ANIMATOR id="animate_visibility" param_id="demo_text.opacity" persistent="true" duration_ms="500" refresh_time_ms="50" />
- <!-- visual element with opacity -->
- <TEXT id="demo_text" width="200" value="Hello World" opacity="1" font_size="+12" text_color="#000080" />
- <!-- display values of parameters -->
- <ROW spacing="10">
- <PARAM_TEXT_CONTROL param_id="animate_visibility" content="animator_value: {value}" />
- <PARAM_TEXT_CONTROL param_id="demo_text.opacity" content="opacity_value: {value}" />
- </ROW>
- <!-- buttons to click -->
- <ROW spacing="10">
- <WIDGET id="blue" background_color="#5799F0" width="120" height="50" mouse_sensitive="true" text_color="#FFFFFF">
- <TEXT value="smooth" width="100%" height="100%" >
- <INVISIBLE_PARAM_BUTTON param_id="animate_visibility" positions_count="2" width="100%" height="100%" />
- </TEXT>
- </WIDGET>
- <WIDGET id="blue" background_color="#FBB469" width="120" height="50" mouse_sensitive="true" text_color="#000000">
- <TEXT value="instant" width="100%" height="100%" >
- <INVISIBLE_PARAM_BUTTON param_id="demo_text.opacity" positions_count="2" width="100%" height="100%" />
- </TEXT>
- </WIDGET>
- </ROW>
- </COLUMN>

Comments
Please, authorize to view and post comments.