A radial menu that pops up around the mouse.

Constructor

new (parent:DisplayObjectContainer, numButtons:Int, ?outerRadius:Float, ?iconRadius:Float, ?innerRadius:Float, ?defaultHandler:Dynamic)

Constructor @parem innerRadius The radius of the inner circle at the center of the menu.

Parameters:

parent

The parent DisplayObjectContainer on which to add this component.

numButtons

The number of segments in the menu

outerRadius

The radius of the menu as a whole.

defaultHandler

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

Variables

borderColor:UInt

Gets / sets the color of the border around buttons.

color:UInt

Gets / sets the base color of buttons.

highlightColor:UInt

Gets / sets the highlighted color of buttons.

read onlyselectedIndex:Int

Gets the selected index.

read onlyselectedItem:Dynamic

Gets the selected item.

Methods

get_color ():UInt

get_selectedItem ():Dynamic

hide ():Void

Hides the menu.

setItem (index:Int, iconOrLabel:Dynamic, ?data:Dynamic):Void

Sets the icon / text and data for a specific menu item. @iconOrLabel Either a display object instance, a class that extends DisplayObject, or text to show in a label. @data Any data to associate with the item.

Parameters:

index

The index of the item to set icon/text and data for.

set_borderColor (value:UInt):UInt

set_color (value:UInt):UInt

set_highlightColor (value:UInt):UInt

show ():Void

Shows the menu - placing it on top level of parent and centering around mouse.

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

draw ():Void

Abstract draw function.

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.