ButtonWidget
The ButtonWidget is a UI widget representing a clickable button in the GUI system
Basic properties
All properties can be accessed via Java / KubeJS.
| Field | Description |
|---|---|
isClicked |
is the button clicked currently |
APIs
setButtonTexture()
Equal to the setBackground.
setClickedTexture()
Remove child widget from it.
setOnPressCallback()
Used to bind functional logic.
ClickData provides mouse state information:
-
clickData.button: mouse button id number.button Description 0left button 1right button 2middle button -
clickData.isShiftClick: is the shift key typed. clickData.isCtrlClick: is the ctrl key typed.clickData.isRemote: is the remote enverionment.
