unpress
Sets the command supplier to be executed when the specified button is released.
This overload accepts a supplier of a Command. If the button was previously bound, only the release command is updated; the press command remains unchanged.
Parameters
button
The button to bind.
command
The command supplier for the release event.
Example:
unpress(Button.A, MyReleaseCommand())
Content copied to clipboard
Overload just for Jayden Sun
Sets the command supplier to be executed when the specified button is released.
This overload accepts a lambda of type () -> Unit
, which is wrapped in an InstantCommand. Useful for simple actions that do not require a full Command implementation.
Parameters
button
The button to bind.
command
The lambda to execute for the release event.
Example:
unpress(Button.B) { println("Released B!") }
Content copied to clipboard
Overload just for Jayden Sun