public class ImageButton extends Button
asyncAddQueue, asyncRemoveAll, asyncRemoveQueue, children, renderNode
deferredQueue, effects, 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, setEnabled
add, add, addAsync, attach, defer, detach, getElementById, getFlexDirection, getLayout, getTotalChildren, remove, remove, removeAll, removeAllAsync, removeAsync, setFlexDirection, setLayout, setStyleId, setVisibility, setZIndex, syncWithRenderNode
addEffectListener, addHoverListener, applyEffect, equals, getId, getStyleId, getVisibility, getZIndex, hashCode, isDebugEnabled, notifyEffectListenersOnFinished, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, removeEffectListener, removeHoverListener, setDebugEnabled
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addHoverListener, getId, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, removeHoverListener
public ImageButton()
ImageButton
public ImageButton(java.lang.String id)
id
- The unique ID for this ImageButton
public TextureRegion getTextureRegion(com.badlogic.gdx.assets.AssetManager assetManager)
TextureRegion
for this ImageButton
assetManager
- The game's AssetManager
TextureRegion
has been setpublic void setTextureRegion(TextureRegion textureRegion)
TextureRegion
used by this ImageButton
textureRegion
- The TextureRegion
to usepublic void setTexture(com.badlogic.gdx.graphics.Texture texture)
Texture
used by this ImageButton
texture
- The Texture
to usepublic void setTexturePath(java.lang.String texturePath)
TextureRegion
by loading it via the AssetManager
texturePath
- 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()
ImageButton
public void setResponsive(boolean responsive)
ImageButton
responsive
-