Developers Manual > Cocos Studio > UI Editor > UI Widget > UI Widget UIButton

UI Widget UIButton



The UIButton subclass implements buttons in the touch screen. The UIButton subclass is a subclass of UIWidget.
The widget provides methods to set title, image, button and other appearance attributes. By using the set method, you can specify a different appearance for each button state.

3x3 grids

For more information, see 3x3 grids.

Common properties

For more information, see Common properties.


Normal State

The default option which displays the graphic (png/jpg) in Normal state.

Pressed State

The pressed option which displays the graphic (png/jpg) in Pressed state.

Disabled State

The disabled option which displays the graphic (png/jpg) in Disabled state.

3-3-2-img-01.png (2.9 kB), 2013-12-03 06:29

3-3-2-img-02.png (4.9 kB), 2013-12-03 06:29

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.