Switch

Inherited: AbstractButton

Description

The Switch class provides a customizable switch button with an animated graphical knob. It inherits functionality from the AbstractButton class and extends it to handle knob-related features and animations.

Public Methods

Vector4

knobColor () const

Frame *

knobGraphic () const

void

setKnobColor (const Vector4 color)

void

setKnobGraphic (Frame * knob)

void

setSwitchDuration (float duration)

float

switchDuration () const

Static Methods

None

Methods Description

Vector4 Switch::knobColor () const

Returns the color of the graphical knob.

See also setKnobColor().


:ref:`Frame<api_Frame>`* Switch::knobGraphic () const

Returns the graphical knob component.

See also setKnobGraphic().


void Switch::setKnobColor (Vector4 color)

Sets the color of the graphical knob.

See also knobColor().


void Switch::setKnobGraphic (Frame * knob)

Sets the graphical knob component.

See also *knob*Graphic().


void Switch::setSwitchDuration (float duration)

Sets the switch animation duration in seconds.

See also switchDuration().


float Switch::switchDuration () const

Returns the switch animation duration in seconds.

See also setSwitchDuration().