IMAGE_PARAM_METER
This widget displays an image depending on the value of the parameter. Its is as an animation or 'filmstrip' for which the image is chosen depending on the value of the parameter: if the parameter value is equal to its minimum the first image is displayed. If the parameter value is equal to its maximum, the last image is displayed.
Attributes brief detailed show all inherited
Examples
Display an analog-like meter and an LED using files from the classic Blue Cat Audio skin:
- <!-- create demo param -->
- <PARAM id="test_param" min="0" max="100" default="50" />
- <!-- display param's value a LED -->
- <IMAGE_PARAM_METER param_id="test_param" image="$PLUGIN_DATA_PATH$/Skins/Controls/Meters/red_led.png" images_count="21" positions_count="21" image_orientation="vertical" ignore_mask_files="true" />
- <!-- display param's value as a meter -->
- <IMAGE image="$PLUGIN_DATA_PATH$/Skins/Controls/Meters/analogvu60.png" ignore_mask_files="true" image_scaling="0.5" />
- <IMAGE_PARAM_METER param_id="test_param" image="$PLUGIN_DATA_PATH$/Skins/Meters/analogvu_needle_large.png" images_count="151" v_offset="-6" offset="1" ignore_mask_files="true" reverse="false" />
- </LAYER_STACK>
- <!-- display param's value as a text -->
- <PARAM_TEXT_CONTROL param_id="test_param" />

If you take a look at red_led.png you'll see several sprites placed vertically like this:

And the similar thing you'll find in the analogvu_needle_large.png - all possible positions of the needle as sprites one after another.
Usually this element is used with DEFINE (see examples in IMAGE_ACTION_BUTTON) to create a custom reusable meter.
You can also create custom meters without external graphics using CANVAS and in-script drawing routines. Alternatively for a simple meter you could adjust height (or width/opacity/color) of some WIDGET say with background_color="#FF0000". Using smth like <PARAM_LINK from="your_param" to="your_widget.height" />.
Comments
Please, authorize to view and post comments.