public class ImageButton extends Button
asyncAddQueue, asyncRemoveAll, asyncRemoveQueue, children, renderNodeeffects, styleId, visibility, zIndex| 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
|
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, getElementById, getFlexDirection, getLayout, getTotalChildren, remove, remove, removeAll, removeAllAsync, removeAsync, setFlexDirection, setLayout, setStyleId, setVisibility, setZIndex, syncWithRenderNodeaddEffectListener, addHoverListener, applyEffect, equals, getId, getStyleId, getVisibility, getZIndex, hashCode, isDebugEnabled, notifyEffectListenersOnFinished, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, removeEffectListener, removeHoverListener, setDebugEnabledclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddHoverListener, getId, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, removeHoverListenerpublic 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 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 -