Button
Button objects are useful for quickly creating styled buttons with rounded corners and outlines.
Keep in mind that on-click and hover functionalities work on all objects, so it is possible to make any object, like Image work as a button. See Click and Hover for more information.
## object name, you can set this to anything that is unique
button1:
## object type, in this case button
type: button
## x and y positions relative to the parent
position: 0 0
## width and height of the object
size: 128 64
## color of the button
color: blue
## corner radius (roundness of corners)
corner-radius: 0
## the color of the outline the button has (can be set to none to be disabled)
## (can be entered as hex, rgb, or the name of the color)
outline-color: none
## the width of the outline in pixels
outline-width: 2
## functions that the object executes when clicked
on-click:
function1:
type: send_message
message: 'You clicked a button!'
## functions that the object executes when hovered
on-hover:
## functions that the object executes when exiting hover state
off-hover:
Last updated