Package com.prineside.tdi2.ui.actors
Class LinearChartActor
java.lang.Object
com.badlogic.gdx.scenes.scene2d.Actor
com.prineside.tdi2.ui.actors.LinearChartActor
public class LinearChartActor
extends com.badlogic.gdx.scenes.scene2d.Actor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidact(float delta) Updates the actor based on time.voiddraw(com.badlogic.gdx.graphics.g2d.Batch batch, float parentAlpha) Draws the actor.voidsetChart(com.badlogic.gdx.utils.FloatArray vals) voidsetChart(InterpolationType interpolationType) voidsetColor(com.badlogic.gdx.graphics.Color color, com.badlogic.gdx.graphics.Color backgroundColor) Methods inherited from class com.badlogic.gdx.scenes.scene2d.Actor
addAction, addCaptureListener, addListener, ancestorsVisible, ascendantsVisible, clear, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, debug, drawDebug, 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, remove, removeAction, removeCaptureListener, removeListener, rotateBy, scaleBy, scaleBy, screenToLocalCoordinates, setBounds, setColor, setColor, setDebug, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setPosition, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setTouchable, setUserObject, setVisible, setWidth, setX, setX, setY, setY, setZIndex, sizeBy, sizeBy, stageToLocalCoordinates, toBack, toFront, toString
-
Constructor Details
-
LinearChartActor
public LinearChartActor()
-
-
Method Details
-
draw
public void draw(com.badlogic.gdx.graphics.g2d.Batch batch, float parentAlpha) Description copied from class:com.badlogic.gdx.scenes.scene2d.ActorDraws the actor. The batch is configured to draw in the parent's coordinate system.This draw methodis convenient to draw a rotated and scaled TextureRegion.Batch.begin()has already been called on the batch. IfBatch.end()is called to draw without the batch thenBatch.begin()must be called before the method returns.The default implementation does nothing.
- Overrides:
drawin classcom.badlogic.gdx.scenes.scene2d.ActorparentAlpha- The parent alpha, to be multiplied with this actor's alpha, allowing the parent's alpha to affect all children.
-
setColor
public void setColor(com.badlogic.gdx.graphics.Color color, com.badlogic.gdx.graphics.Color backgroundColor) -
setChart
public void setChart(com.badlogic.gdx.utils.FloatArray vals) - Parameters:
vals- any amount of points between 0 and 1, will be stretched to the width of an actor
-
setChart
-
act
public void act(float delta) Description copied from class:com.badlogic.gdx.scenes.scene2d.ActorUpdates the actor based on time. Typically this is called each frame byStage.act(float).The default implementation calls
Action.act(float)on each action and removes actions that are complete.- Overrides:
actin classcom.badlogic.gdx.scenes.scene2d.Actor- Parameters:
delta- Time in seconds since the last frame.
-