IMAGE_PARAM_LINEAR_METER
This widget displays a linear meter which position depends on the parameter value.
Attributes brief detailed show all inherited
Examples
A simple example with horizontal and vertical meters.
- <!-- create demo param -->
- <PARAM id="demo_param" min="0" max="1" default="0" value_format="0.3" />
- <!-- a horizontal meter -->
- <IMAGE_PARAM_LINEAR_METER param_id="demo_param" orientation="horizontal" image="$PLUGIN_DATA_PATH$/Skins/Modern-Theme/meters/hmeter/hmeter_short.png" ignore_mask_files="true" />
- <!-- a vertical "leds" meter with positions_count set -->
- <IMAGE_PARAM_LINEAR_METER param_id="demo_param" orientation="vertical" positions_count="12" image="$SCRIPT_DATA_PATH$/leds_meter.png" ignore_mask_files="true" />
- <!-- text value of a param -->
- <PARAM_TEXT_CONTROL param_id="demo_param" />
- <!-- an action to constantly change demo_param value -->
- <TIMER id="regular_timer" refresh_time_ms="50" />
- <ACTION_TRIGGER event_id="regular_timer.elapsed"
- script="demo_param = abs(sin(inc_value)); inc_value+=0.01; if (inc_value>100) inc_value=0;" requires="demo_param" />
- <SCRIPT script="double inc_value=0;" />

Notice that vertical meter has "positions_count" set, so the LEDs are never cut.
Images used
To create a linear meter we need at least two images, one for the "empty" and one for the "full" states.
- hmeter_short.png
- hmeter_short_selected.png
- leds_meter.png and leds_meter_selected.png
Use with DEFINE
This widget is often used within DEFINE to create a reusable item. See an example in IMAGE_ACTION_BUTTON.
Comments
Please, authorize to view and post comments.