A meter component similar to a voltage meter, with a dial and a needle that indicates a value.

Constructor

new (?parent:DisplayObjectContainer, ?xpos:Float, ?ypos:Float, ?text:String)

Constructor

Parameters:

parent

The parent DisplayObjectContainer on which to add this Meter.

xpos

The x position to place this component.

ypos

The y position to place this component.

text

The string to use as the initial text in this component.

Variables

damp:Float

Gets / sets the damping value for the meter.

label:String

Gets / sets the label shown on the meter.

maximum:Float

Gets / sets the maximum value for the meter.

minimum:Float

Gets / sets the minimum value for the meter.

showValues:Bool

Gets / sets whether or not value labels will be shown for max and min values.

value:Float

Gets / sets the current value for the meter.

Methods

draw ():Void

Draws the visual ui of the component.

get_damp ():Float

get_label ():String

get_maximum ():Float

get_minimum ():Float

get_value ():Float

setSize (w:Float, h:Float):Void

Sets the size of the component. Adjusts height to be 1/2 width.

Parameters:

w

The width of the component.

h

The height of the component.

set_damp (value:Float):Float

set_label (value:String):String

set_maximum (value:Float):Float

set_minimum (value:Float):Float

set_showValues (value:Bool):Bool

set_value (value:Float):Float

Inherited Variables

Defined by Component

enabled:Bool

Sets/gets whether this component is enabled or not.

tag:Int

Sets/gets in integer that can identify the component.

Inherited Methods

Defined by Component

get_enabled ():Bool

get_height ():Float

get_tag ():Int

get_width ():Float

move (xpos:Float, ypos:Float):Void

Moves the component to the specified position.

Parameters:

xpos

the x position to move the component

ypos

the y position to move the component

set_enabled (value:Bool):Bool

set_height (value:Float):Void

Sets/gets the height of the component.

set_tag (value:Int):Int

set_width (value:Float):Void

Sets/gets the width of the component.

set_x (value:Float):Void

Overrides the setter for x to always place the component on a whole pixel.

set_y (value:Float):Void

Overrides the setter for y to always place the component on a whole pixel.