RadioButton

final case
class RadioButton(position: Point, onSelected: () => List[GlobalEvent], onUnselected: () => List[GlobalEvent], onHoverOver: () => List[GlobalEvent], onHoverOut: () => List[GlobalEvent], hitArea: Option[Rectangle], buttonAssets: Option[ButtonAssets], state: RadioButtonState)

Represents an individual option button in a radio button group. This class just containing the distinct information for this option: it's position and the events fired on interacting with it. Attributes shared between options are contained in the RadioButtonGroup class.

Value Params
onHoverOut

The events fired when this button is no longer hovered over

onHoverOver

The events fired when this button is hovered over

onSelected

The events fired when this button is selected

onUnselected

The events fired when this button ceases to be selected

position

The top-left position of this option button

state

The current state of the radio button i.e., selected, hover, or normal

Companion
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

Deselect this radio button

Deselect this radio button

Returns

RadioButton

def inHoverState: Boolean

Ask if this radio button has been hovered over

Ask if this radio button has been hovered over

Returns

RadioButton

def inSelectedState: Boolean

Ask if this radio button is selected

Ask if this radio button is selected

Returns

RadioButton

Set this radio button to the selected state (may be overriden during validation)

Set this radio button to the selected state (may be overriden during validation)

Returns

RadioButton

Give this radio button its own button assets

Give this radio button its own button assets

Value Params
newButtonAssets

the assets to use when rendering this radio button

Returns

RadioButton

def withButtonAssets(newButtonAssets: Option[ButtonAssets]): RadioButton

Optionally give this radio button its own button assets. A value of None means that the button should be rendered with the default group level assets.

Optionally give this radio button its own button assets. A value of None means that the button should be rendered with the default group level assets.

Value Params
newButtonAssets

the assets to use when rendering this radio button

Returns

RadioButton

def withDeselectedActions(actions: GlobalEvent*): RadioButton

Events to fire when deselected.

Events to fire when deselected.

Value Params
actions

A variables number of events to fire

def withDeselectedActions(actions: => List[GlobalEvent]): RadioButton

Events to fire when deselected.

Events to fire when deselected.

Value Params
actions

A list of events to fire

def withHitArea(newHitArea: Rectangle): RadioButton

Give this button it's own hit area

Give this button it's own hit area

Value Params
newHitArea

the hit area to use for this radio button

Returns

RadioButton

def withHitArea(newHitArea: Option[Rectangle]): RadioButton

Optionally give this button it's own hit area. A value of None means that the button should use the default group level hit area.

Optionally give this button it's own hit area. A value of None means that the button should use the default group level hit area.

Value Params
newHitArea

the hit area to use for this radio button

Returns

RadioButton

def withHoverOutActions(actions: GlobalEvent*): RadioButton

Events to fire on hover out.

Events to fire on hover out.

Value Params
actions

A variables number of events to fire

def withHoverOutActions(actions: => List[GlobalEvent]): RadioButton

Events to fire on hover out.

Events to fire on hover out.

Value Params
actions

A list of events to fire

def withHoverOverActions(actions: GlobalEvent*): RadioButton

Events to fire on hover over.

Events to fire on hover over.

Value Params
actions

A variables number of events to fire

def withHoverOverActions(actions: => List[GlobalEvent]): RadioButton

Events to fire on hover over.

Events to fire on hover over.

Value Params
actions

A list of events to fire

def withSelectedActions(actions: GlobalEvent*): RadioButton

Events to fire when selected.

Events to fire when selected.

Value Params
actions

A variables number of events to fire

def withSelectedActions(actions: => List[GlobalEvent]): RadioButton

Events to fire when selected.

Events to fire when selected.

Value Params
actions

A list of events to fire

Inherited methods

def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product