Image to display an image. This is useful when the button must be larger than the image and the
image centered on the button. If the image is the size of the button, a Button without any children can be used, where
the Button.ButtonStyle#up , Button.ButtonStyle#down , and Button.ButtonStyle#checked nine patches define
the image.
| Modifier and Type | Class and Description |
|---|---|
| public static class | ImageButton.
The style for an image button, see |
| Modifier and Type | Field and Description |
|---|---|
| private final Image | |
| private ImageButton. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | draw(Batch batch, float parentAlpha)
Overrides com. If this method is overridden, the super method or |
| public Image | |
| public Cell | |
| protected Drawable | getImageDrawable()
Returns the appropriate image drawable from the style based on the current button state. |
| public ImageButton. | getStyle()
Overrides com. Implements com. Returns the button's style. |
| protected Image | |
| public void | setStyle(Button.
Overrides com. Implements com. Set the current style of the actor |
| public String | toString()
Overrides com. Returns a description of the actor hierarchy, recursively. |
| protected void |
| image | back to summary |
|---|---|
| private final Image image | |
| style | back to summary |
|---|---|
| private ImageButton. | |
| ImageButton | back to summary |
|---|---|
| public ImageButton(Skin skin) | |
| ImageButton | back to summary |
|---|---|
| public ImageButton(Skin skin, String styleName) | |
| ImageButton | back to summary |
|---|---|
| public ImageButton(ImageButton. | |
| ImageButton | back to summary |
|---|---|
| public ImageButton(Drawable imageUp) | |
| ImageButton | back to summary |
|---|---|
| public ImageButton(Drawable imageUp, Drawable imageDown) | |
| ImageButton | back to summary |
|---|---|
| public ImageButton(Drawable imageUp, Drawable imageDown, Drawable imageChecked) | |
| draw | back to summary |
|---|---|
| public void draw(Batch batch, float parentAlpha) Overrides com. Doc from com. If this method is overridden, the super method or | |
| getImage | back to summary |
|---|---|
| public Image getImage() | |
| getImageCell | back to summary |
|---|---|
| public Cell | |
| getImageDrawable | back to summary |
|---|---|
| protected Drawable getImageDrawable() Returns the appropriate image drawable from the style based on the current button state.
| |
| getStyle | back to summary |
|---|---|
| public ImageButton. Overrides com. Implements com. Doc from com. Returns the button's style. Modifying the returned style may not have an effect until | |
| newImage | back to summary |
|---|---|
| protected Image newImage() | |
| setStyle | back to summary |
|---|---|
| public void setStyle(Button. Overrides com. Implements com. Doc from com. Set the current style of the actor | |
| toString | back to summary |
|---|---|
| public String toString() Overrides com. Doc from com. Returns a description of the actor hierarchy, recursively. | |
| updateImage | back to summary |
|---|---|
| protected void updateImage() Sets the image drawable based on the current button state. The default implementation sets the image drawable using
| |
ImageButton.
| Modifier and Type | Field and Description |
|---|---|
| public Drawable | |
| public Drawable | |
| public Drawable | |
| public Drawable | |
| public Drawable | |
| public Drawable | |
| public Drawable |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public |
| imageChecked | back to summary |
|---|---|
| public Drawable imageChecked
| |
| imageCheckedDown | back to summary |
|---|---|
| public Drawable imageCheckedDown
| |
| imageCheckedOver | back to summary |
|---|---|
| public Drawable imageCheckedOver
| |
| imageDisabled | back to summary |
|---|---|
| public Drawable imageDisabled
| |
| imageDown | back to summary |
|---|---|
| public Drawable imageDown
| |
| imageOver | back to summary |
|---|---|
| public Drawable imageOver
| |
| imageUp | back to summary |
|---|---|
| public Drawable imageUp
| |
| ImageButtonStyle | back to summary |
|---|---|
| public ImageButtonStyle() | |
| ImageButtonStyle | back to summary |
|---|---|
| public ImageButtonStyle(Drawable up, Drawable down, Drawable checked, Drawable imageUp, Drawable imageDown, Drawable imageChecked) | |
| ImageButtonStyle | back to summary |
|---|---|
| public ImageButtonStyle(ImageButton. | |
| ImageButtonStyle | back to summary |
|---|---|
| public ImageButtonStyle(Button. | |