Class Button

All Implemented Interfaces:
Cullable, Disableable, Layout
Direct Known Subclasses:
ImageButton, ImageTextButton, TextButton

public class Button extends Table implements Disableable
A button is a Table with a checked state and additional style fields for pressed, unpressed, and checked. Each time a button is clicked, the checked state is toggled. Being a table, a button can contain any other actors.

The button's padding is set to the background drawable's padding when the background changes, overwriting any padding set manually. Padding can still be set on the button's table cells.

ChangeListener.ChangeEvent is fired when the button is clicked. Cancelling the event will restore the checked button state to what is was previously.

The preferred size of the button is determined by the background and the button contents.

Author:
Nathan Sweet