public class ImageButton extends Button
| Modifier and Type | Field and Description | 
|---|---|
protected Image | 
image  | 
asyncAddQueue, asyncRemoveAll, asyncRemoveQueue, children, renderNode| Constructor and Description | 
|---|
ImageButton()
Constructor. 
 | 
ImageButton(java.lang.String id)
Constructor 
 | 
| Modifier and Type | Method and Description | 
|---|---|
java.lang.String | 
getAtlas()
Returns the atlas (if any) to look up the texture in 
 | 
Image | 
getImage()
Returns the backing  
Image for the button | 
java.lang.String | 
getTexturePath()
Returns the current texture path 
 | 
TextureRegion | 
getTextureRegion(com.badlogic.gdx.assets.AssetManager assetManager)
Returns the current  
TextureRegion for this ImageButton | 
boolean | 
isResponsive()
Returns if the image should scale to the size of the  
ImageButton | 
void | 
setAtlas(java.lang.String atlas)
Sets the atlas to look up the texture in 
 | 
void | 
setResponsive(boolean responsive)
Sets if the image should scale to the size of the  
ImageButton | 
void | 
setTexture(com.badlogic.gdx.graphics.Texture texture)
Sets the current  
Texture used by this ImageButton | 
void | 
setTexturePath(java.lang.String texturePath)
Sets the current texture path. 
 | 
void | 
setTextureRegion(TextureRegion textureRegion)
Sets the current  
TextureRegion used by this ImageButton | 
addActionListener, createRenderNode, isEnabled, notifyActionListenersOfBeginEvent, notifyActionListenersOfEndEvent, removeActionListener, setEnabledadd, add, addAsync, attach, detach, get, getElementById, getFlexDirection, getHorizontalLayout, getTotalChildren, getVerticalLayout, isOverflowClipped, remove, remove, removeAll, removeAllAsync, removeAsync, setFlexDirection, setHorizontalLayout, setOverflowClipped, setStyleId, setVerticalLayout, setVisibility, setZIndex, syncWithRenderNodeaddEffectListener, addHoverListener, applyEffect, defer, defer, equals, getId, getStyleId, getVisibility, getZIndex, hashCode, isDebugEnabled, notifyEffectListenersOnFinished, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, processDeferred, removeEffectListener, removeHoverListener, setDebugEnabledclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddHoverListener, getId, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, removeHoverListenerprotected Image image
public ImageButton()
ImageButtonpublic ImageButton(java.lang.String id)
id - The unique ID for this ImageButtonpublic TextureRegion getTextureRegion(com.badlogic.gdx.assets.AssetManager assetManager)
TextureRegion for this ImageButtonassetManager - The game's AssetManagerTextureRegion has been setpublic void setTextureRegion(TextureRegion textureRegion)
TextureRegion used by this ImageButtontextureRegion - The TextureRegion to usepublic void setTexture(com.badlogic.gdx.graphics.Texture texture)
Texture used by this ImageButtontexture - The Texture to usepublic java.lang.String getTexturePath()
public void setTexturePath(java.lang.String texturePath)
TextureRegion by loading it via the AssetManagertexturePath - The path to the texturepublic java.lang.String getAtlas()
public void setAtlas(java.lang.String atlas)
atlas - Null if the texture should not be looked up via an atlaspublic boolean isResponsive()
ImageButtonpublic void setResponsive(boolean responsive)
ImageButtonresponsive -