Button

class Button(button: () -> Boolean) : Control

A button control that has a value of true or false.

Parameters

button

the value of the button to watch

Constructors

Link copied to clipboard
constructor(button: () -> Boolean)

Properties

Link copied to clipboard

Whether the current boolean state just changed to false.

Link copied to clipboard
var heldCommand: () -> Command

This command will be scheduled every update that the button is held down

Link copied to clipboard

This command will be scheduled every time the button is pressed

Link copied to clipboard

This command will be scheduled every time the button is released

Link copied to clipboard

Whether the current boolean state just changed to true.

Link copied to clipboard

The current boolean state of this control.

Link copied to clipboard

This command will be scheduled whenever the state changes

Link copied to clipboard

Whether the current boolean state just changed.

Functions

Link copied to clipboard
open override fun update()

Updates the current state and the rising, falling, and changed states. Further, schedules commands accordingly.