ui.Button.onClick

Registers a callback that's fired when the button is clicked.

Returns an ID which can be passed to unlisten() to unregister the callback.

UsageReturns
Button.onClick(callback)String
ArgumentTypeDetails
this: ui.buttonui.ButtonThe ui.Button instance.
callbackFunctionThe callback to fire when the button is clicked. The callback is passed the button widget.