RadioButton

indigoextras.ui.RadioButton
See theRadioButton companion object
final case class RadioButton(position: Point, onSelected: () => Batch[GlobalEvent], onUnselected: () => Batch[GlobalEvent], onHoverOver: () => Batch[GlobalEvent], onHoverOut: () => Batch[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 parameters

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

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Deselect this radio button

Deselect this radio button

Attributes

Returns

RadioButton

def inHoverState: Boolean

Ask if this radio button has been hovered over

Ask if this radio button has been hovered over

Attributes

Returns

RadioButton

def inSelectedState: Boolean

Ask if this radio button is selected

Ask if this radio button is selected

Attributes

Returns

RadioButton

def moveBy(point: Point): RadioButton
def moveBy(x: Int, y: Int): RadioButton
def moveTo(point: Point): RadioButton
def moveTo(x: Int, y: Int): 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)

Attributes

Returns

RadioButton

def withButtonAssets(newButtonAssets: ButtonAssets): RadioButton

Give this radio button its own button assets

Give this radio button its own button assets

Value parameters

newButtonAssets

the assets to use when rendering this radio button

Attributes

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 parameters

newButtonAssets

the assets to use when rendering this radio button

Attributes

Returns

RadioButton

Events to fire when deselected.

Events to fire when deselected.

Value parameters

actions

A variables number of events to fire

Attributes

Events to fire when deselected.

Events to fire when deselected.

Value parameters

actions

A list of events to fire

Attributes

def withHitArea(newHitArea: Rectangle): RadioButton

Give this button it's own hit area

Give this button it's own hit area

Value parameters

newHitArea

the hit area to use for this radio button

Attributes

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 parameters

newHitArea

the hit area to use for this radio button

Attributes

Returns

RadioButton

Events to fire on hover out.

Events to fire on hover out.

Value parameters

actions

A variables number of events to fire

Attributes

Events to fire on hover out.

Events to fire on hover out.

Value parameters

actions

A list of events to fire

Attributes

Events to fire on hover over.

Events to fire on hover over.

Value parameters

actions

A variables number of events to fire

Attributes

Events to fire on hover over.

Events to fire on hover over.

Value parameters

actions

A list of events to fire

Attributes

Events to fire when selected.

Events to fire when selected.

Value parameters

actions

A variables number of events to fire

Attributes

Events to fire when selected.

Events to fire when selected.

Value parameters

actions

A list of events to fire

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product