A knob component for choosing a numerical value.

Constructor

new (?parent:DisplayObjectContainer, ?xpos:Float, ?ypos:Float, ?label:String, ?defaultHandler:Dynamic)

Constructor

Parameters:

parent

The parent DisplayObjectContainer on which to add this Knob.

xpos

The x position to place this component.

ypos

The y position to place this component.

label

String containing the label for this component.

defaultHandler

The event handling function to handle the default event for this component (change in this case).

Variables

label:String

Gets / sets the text shown in this component's label.

labelPrecision:Int

Gets / sets the number of decimals to format the value label.

maximum:Float

Gets / sets the maximum value of this knob.

minimum:Float

Gets / sets the minimum value of this knob.

mode:String

mouseRange:Float

Sets / gets the number of pixels the mouse needs to move to make the value of the knob go from min to max.

radius:Float

showValue:Bool

Gets / sets whether or not to show the value label.

value:Float

Sets / gets the current value of this knob.

Methods

draw ():Void

Draws the visual ui of the component.

get_label ():String

get_maximum ():Float

get_minimum ():Float

get_mode ():String

get_radius ():Float

get_value ():Float

set_label (value:String):String

set_labelPrecision (value:Int):Int

set_maximum (value:Float):Float

set_minimum (value:Float):Float

set_mode (value:String):String

set_mouseRange (value:Float):Float

set_radius (value:Float):Float

set_showValue (value:Bool):Bool

set_value (value:Float):Float

Static variables

staticinline read onlyHORIZONTAL:String

staticinline read onlyROTATE:String

staticinline read onlyVERTICAL:String

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

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

Sets the size of the component.

Parameters:

w

The width of the component.

h

The height of 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.