bind

fun bind(button: Button, commandSupplier: () -> Command): ButtonBinding

Creates a pair of a Button and a command supplier function.

Return

A pair of the button and the command supplier.

Parameters

button

The button to bind.

commandSupplier

A function that supplies the command to be executed when the button is pressed.