A button is an element that performs an action when clicked. It has a text label that is describing the function of the button.
// Construct a new Button with the label "Quit"
var myButton = new Button("Quit");
myButton.addEventListener(MouseClickEvent, (event: MouseClickEvent) -> {
// If the left mouse button is released over the button, quit the application
if (event.mouseButton == Left && event.getState() == ClickEnd) {
kha.System.stop();
}
});