| Modifier and Type | Field and Description |
|---|---|
protected AnimatedImageRenderNode |
renderNode |
| Constructor and Description |
|---|
AnimatedImage()
Constructor.
|
AnimatedImage(java.lang.String id)
Constructor
|
AnimatedImage(java.lang.String id,
java.lang.String[] texturePaths,
float[] durations)
Constructor
|
AnimatedImage(java.lang.String id,
com.badlogic.gdx.graphics.Texture[] textures,
float[] durations)
Constructor
|
AnimatedImage(java.lang.String id,
TextureRegion[] textureRegions,
float[] durations)
Constructor
|
AnimatedImage(com.badlogic.gdx.graphics.Texture[] textures,
float[] durations)
Constructor.
|
AnimatedImage(TextureRegion[] textureRegions,
float[] durations)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
attach(ParentRenderNode<?,?> parentRenderNode)
Attaches a
RenderNode for this element to a parent
RenderNode |
void |
detach(ParentRenderNode<?,?> parentRenderNode)
Detaches this element's
RenderNode from a parent
RenderNode |
java.lang.String |
getAtlas()
Returns the atlas (if any) to look up the texture in
|
float[] |
getFrameDurations()
Returns the animation frame durations
|
java.lang.String[] |
getTexturePaths()
Returns the texture paths for the animation
|
TextureRegion[] |
getTextureRegions(com.badlogic.gdx.assets.AssetManager assetManager)
Returns the current
TextureRegion array for this
AnimatedImage |
boolean |
isFlipX()
Returns if the texture should be flipped horizontally during rendering
|
boolean |
isFlipY()
Returns if the texture should be flipped vertically during rendering
|
boolean |
isResponsive()
Returns if this
AnimatedImage should scale to the size of its
parent |
void |
postDeserialize() |
void |
setAtlas(java.lang.String atlas)
Sets the atlas to look up the texture in
|
void |
setFlipX(boolean flipX)
Sets if the texture should be flipped horizontally during rendering
|
void |
setFlipY(boolean flipY)
Sets if the texture should be flipped vertically during rendering
|
void |
setResponsive(boolean responsive)
Sets if this
AnimatedImage should scale to the size of its parent |
void |
setStyleId(java.lang.String styleId)
Sets the style if for this
UiElement |
void |
setTexturePaths(java.lang.String[] texturePaths,
float[] durations)
Sets the current texture path array.
|
void |
setTextureRegions(TextureRegion[] textureRegions,
float[] durations)
Sets the current
TextureRegion array used by this
AnimatedImage |
void |
setTextures(com.badlogic.gdx.graphics.Texture[] textures,
float[] durations)
Sets the current
Texture array used by this AnimatedImage |
void |
setVisibility(Visibility visibility)
Sets the current
Visibility of this UiElement |
void |
setZIndex(int zIndex)
Sets the Z index of this
UiElement. |
void |
syncWithRenderNode()
Syncs data between the
UiElement and RenderNode |
addEffectListener, addHoverListener, applyEffect, defer, defer, equals, getElementById, getId, getStyleId, getVisibility, getZIndex, hashCode, isDebugEnabled, notifyEffectListenersOnFinished, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, processDeferred, removeEffectListener, removeHoverListener, setDebugEnabledprotected AnimatedImageRenderNode renderNode
public AnimatedImage()
AnimatedImagepublic AnimatedImage(java.lang.String id)
id - The unique ID for this AnimatedImagepublic AnimatedImage(java.lang.String id,
java.lang.String[] texturePaths,
float[] durations)
id - The unique ID for this AnimatedImagetexturePaths - The paths for the textures to be loaded by the
AssetManagerdurations - The durations for each frame (in seconds)public AnimatedImage(com.badlogic.gdx.graphics.Texture[] textures,
float[] durations)
AnimatedImagetextures - The Textures to use for each framedurations - The durations for each frame (in seconds)public AnimatedImage(TextureRegion[] textureRegions, float[] durations)
AnimatedImagetextureRegions - The TextureRegions to use for each framedurations - The durations for each frame (in seconds)public AnimatedImage(java.lang.String id,
com.badlogic.gdx.graphics.Texture[] textures,
float[] durations)
id - The unique ID for this AnimatedImagetextures - The Textures to use for each framedurations - The durations for each frame (in seconds)public AnimatedImage(java.lang.String id,
TextureRegion[] textureRegions,
float[] durations)
id - The unique ID for this AnimatedImagetextureRegions - The TextureRegions to use for each framedurations - The durations for each frame (in seconds)public void postDeserialize()
public void attach(ParentRenderNode<?,?> parentRenderNode)
UiElementRenderNode for this element to a parent
RenderNodeattach in class UiElementparentRenderNode - The parent RenderNode to attach topublic void detach(ParentRenderNode<?,?> parentRenderNode)
UiElementRenderNode from a parent
RenderNodedetach in class UiElementparentRenderNode - The parent RenderNode to detach frompublic TextureRegion[] getTextureRegions(com.badlogic.gdx.assets.AssetManager assetManager)
TextureRegion array for this
AnimatedImageassetManager - The game's AssetManagerpublic void setTextureRegions(TextureRegion[] textureRegions, float[] durations)
TextureRegion array used by this
AnimatedImagetextureRegions - The TextureRegions to use for the animationdurations - The durations for each frame (in seconds)public void setTextures(com.badlogic.gdx.graphics.Texture[] textures,
float[] durations)
Texture array used by this AnimatedImagetextures - The Textures to use for the animationdurations - The durations for each frame (in seconds)public java.lang.String[] getTexturePaths()
public float[] getFrameDurations()
public void setTexturePaths(java.lang.String[] texturePaths,
float[] durations)
TextureRegion array by loading it via the AssetManagertexturePaths - The paths to the textures for the animationdurations - The durations for each frame (in seconds)public 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()
AnimatedImage should scale to the size of its
parentpublic void setResponsive(boolean responsive)
AnimatedImage should scale to the size of its parentresponsive - public void setVisibility(Visibility visibility)
UiElementVisibility of this UiElementsetVisibility in class UiElementvisibility - The Visibility to setpublic void syncWithRenderNode()
UiElementUiElement and RenderNodesyncWithRenderNode in class UiElementpublic void setStyleId(java.lang.String styleId)
UiElementUiElementsetStyleId in class UiElementstyleId - The style id to setpublic void setZIndex(int zIndex)
UiElementUiElement. Elements will be rendered on
different Z layers in ascending Z order (negatives values first, positive values last)public boolean isFlipX()
public void setFlipX(boolean flipX)
flipX - True if the texture should be flippedpublic boolean isFlipY()
public void setFlipY(boolean flipY)
flipY - True if the texture should be flipped