PackageTop Level
Classpublic class OptionButton

Option buttons are displayed on the option panel.

This class dispatches the following events:

NameTypeDispatched...
clickClickwhen the button is clicked

See also

OptionPanel


Public Methods
 MethodDefined by
  
Constructor.
OptionButton
  
addEventListener(eventName:String, callback:String):void
This method lets you register event listener functions with the specified control or object.
OptionButton
  
getIconFile():String
Gets the icon file associated with the button.
OptionButton
  
getName():String
Gets the control name.
OptionButton
  
getToolTip():String
Gets the tooltip associated with this control.
OptionButton
  
popupMenu(menu:Menu):void
Pops up a menu below the button.
OptionButton
  
setIconFile(iconFile:String):void
Sets the icon associated with the button.
OptionButton
  
setName(name:String):void
Sets the control name.
OptionButton
  
setToolTip(tooltip:String):void
Sets the tooltip that shows up when the user moves the mouse over the control.
OptionButton
Constructor detail
OptionButton()constructor
public function OptionButton()

Constructor.

Method detail
addEventListener()method
public function addEventListener(eventName:String, callback:String):void

This method lets you register event listener functions with the specified control or object. The event listener functions always receive an event object as a parameter. This event has, among other, a sender property which is a reference to the object that has dispatched the event. This object may also have additional properties which depend on the the event.

Parameters
eventName:String — The event you wish to listen to.
 
callback:String — The Lua function to call when the event is triggered.

See also

getIconFile()method 
public function getIconFile():String

Gets the icon file associated with the button.

Returns
String — The icon file path.
getName()method 
public function getName():String

Gets the control name.

Returns
String — The control name.
getToolTip()method 
public function getToolTip():String

Gets the tooltip associated with this control.

Returns
String — The tooltip.
popupMenu()method 
public function popupMenu(menu:Menu):void

Pops up a menu below the button. This can be used to allow the user to choose between multiple options when the button is clicked.

Parameters
menu:Menu — The menu to display.

See also

setIconFile()method 
public function setIconFile(iconFile:String):void

Sets the icon associated with the button. Set it to an empty string to use the default icon.

Parameters
iconFile:String — The icon file path.
setName()method 
public function setName(name:String):void

Sets the control name.

Parameters
name:String — The control name.
setToolTip()method 
public function setToolTip(tooltip:String):void

Sets the tooltip that shows up when the user moves the mouse over the control.

Parameters
tooltip:String — The tooltip.