ToggleButton:
Filter:
crucial-library/Classes (extension) | Libraries > crucial > GUI

ToggleButton
ExtensionExtension

simple two state button

Description

Class Methods

.new

Arguments:

layout
title
onFunction
offFunction
init
minWidth

button width is calculated to fit the title setting minWidth will widen the button to a minimum width

minHeight

default is the GUI.skin.buttonHeight

onColor
offColor

Instance Methods

.state

.onFunction

.offFunction

.value

set the value, not doing the action

Arguments:

way

.toggle

with no arguments it toggles the state, doing the action or may set the value explicitly (like value_ but doing the action as well)

Arguments:

way
doAction

boolean: if the action handler should be run

.init

Arguments:

layout
init
title
minWidth
minHeight
onc
offc

.prSetState

Arguments:

newstate