Package gaiasky.util.scene2d
Class TextureWidget
java.lang.Object
com.badlogic.gdx.scenes.scene2d.Actor
com.badlogic.gdx.scenes.scene2d.ui.Widget
gaiasky.util.scene2d.TextureWidget
- All Implemented Interfaces:
com.badlogic.gdx.scenes.scene2d.utils.Layout
public class TextureWidget
extends com.badlogic.gdx.scenes.scene2d.ui.Widget
-
Constructor Summary
ConstructorDescriptionTextureWidget
(com.badlogic.gdx.graphics.glutils.FrameBuffer fb) TextureWidget
(com.badlogic.gdx.graphics.Texture texture) -
Method Summary
Modifier and TypeMethodDescriptionvoid
draw
(com.badlogic.gdx.graphics.g2d.Batch batch, float parentAlpha) float
float
float
float
float
float
void
setFlip
(boolean x, boolean y) Flip the texture.void
setScale
(float scale) Set the scale factor of the texture.void
setScale
(float scaleX, float scaleY) Set the scale factor of the texture.Methods inherited from class com.badlogic.gdx.scenes.scene2d.ui.Widget
invalidate, invalidateHierarchy, layout, needsLayout, pack, setFillParent, setLayoutEnabled, sizeChanged, validate
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Actor
act, addAction, addCaptureListener, addListener, ancestorsVisible, ascendantsVisible, clear, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, debug, drawDebug, drawDebugBounds, fire, firstAscendant, getActions, getCaptureListeners, getColor, getDebug, getHeight, getListeners, getName, getOriginX, getOriginY, getParent, getRight, getRotation, getScaleX, getScaleY, getStage, getTop, getTouchable, getUserObject, getWidth, getX, getX, getY, getY, getZIndex, hasActions, hasKeyboardFocus, hasParent, hasScrollFocus, hit, isAscendantOf, isDescendantOf, isTouchable, isTouchFocusListener, isTouchFocusTarget, isVisible, localToActorCoordinates, localToAscendantCoordinates, localToParentCoordinates, localToScreenCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, positionChanged, remove, removeAction, removeCaptureListener, removeListener, rotateBy, rotationChanged, scaleBy, scaleBy, scaleChanged, screenToLocalCoordinates, setBounds, setColor, setColor, setDebug, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setParent, setPosition, setPosition, setRotation, setScaleX, setScaleY, setSize, setStage, setTouchable, setUserObject, setVisible, setWidth, setX, setX, setY, setY, setZIndex, sizeBy, sizeBy, stageToLocalCoordinates, toBack, toFront, toString
-
Constructor Details
-
TextureWidget
public TextureWidget(com.badlogic.gdx.graphics.glutils.FrameBuffer fb) -
TextureWidget
public TextureWidget(com.badlogic.gdx.graphics.Texture texture)
-
-
Method Details
-
draw
public void draw(com.badlogic.gdx.graphics.g2d.Batch batch, float parentAlpha) - Overrides:
draw
in classcom.badlogic.gdx.scenes.scene2d.ui.Widget
-
setFlip
public void setFlip(boolean x, boolean y) Flip the texture.- Parameters:
x
- Flip horizontally.y
- Flip vertically.
-
setScale
public void setScale(float scale) Set the scale factor of the texture.- Overrides:
setScale
in classcom.badlogic.gdx.scenes.scene2d.Actor
- Parameters:
scale
- The scale factor in both x and y dimensions.
-
setScale
public void setScale(float scaleX, float scaleY) Set the scale factor of the texture.- Overrides:
setScale
in classcom.badlogic.gdx.scenes.scene2d.Actor
- Parameters:
scaleX
- The scale factor in x.scaleY
- The scale factor in y.
-
getMinWidth
public float getMinWidth()- Specified by:
getMinWidth
in interfacecom.badlogic.gdx.scenes.scene2d.utils.Layout
- Overrides:
getMinWidth
in classcom.badlogic.gdx.scenes.scene2d.ui.Widget
-
getMinHeight
public float getMinHeight()- Specified by:
getMinHeight
in interfacecom.badlogic.gdx.scenes.scene2d.utils.Layout
- Overrides:
getMinHeight
in classcom.badlogic.gdx.scenes.scene2d.ui.Widget
-
getPrefWidth
public float getPrefWidth()- Specified by:
getPrefWidth
in interfacecom.badlogic.gdx.scenes.scene2d.utils.Layout
- Overrides:
getPrefWidth
in classcom.badlogic.gdx.scenes.scene2d.ui.Widget
-
getPrefHeight
public float getPrefHeight()- Specified by:
getPrefHeight
in interfacecom.badlogic.gdx.scenes.scene2d.utils.Layout
- Overrides:
getPrefHeight
in classcom.badlogic.gdx.scenes.scene2d.ui.Widget
-
getMaxWidth
public float getMaxWidth()- Specified by:
getMaxWidth
in interfacecom.badlogic.gdx.scenes.scene2d.utils.Layout
- Overrides:
getMaxWidth
in classcom.badlogic.gdx.scenes.scene2d.ui.Widget
-
getMaxHeight
public float getMaxHeight()- Specified by:
getMaxHeight
in interfacecom.badlogic.gdx.scenes.scene2d.utils.Layout
- Overrides:
getMaxHeight
in classcom.badlogic.gdx.scenes.scene2d.ui.Widget
-