public class TextCellFactory.Glyph extends com.badlogic.gdx.scenes.scene2d.Actor implements ICellVisible
TextCellFactory.glyph(char, Color, float, float)
or an overload of that method on TextCellFactory.ICellVisible.Basic, ICellVisible.Named
Modifier and Type | Field and Description |
---|---|
char |
shown
The char that will be shown for this Glyph.
|
Constructor and Description |
---|
Glyph()
Makes an orange '@' Glyph at 0,0 in world coordinates.
|
Glyph(char shown,
com.badlogic.gdx.graphics.Color color,
float x,
float y)
Makes a Glyph of the given char in the given Color, at the specified world coordinates.
|
Glyph(char shown,
float color,
float x,
float y)
Makes a Glyph of the given char in the given packed float color, at the specified world coordinates.
|
Modifier and Type | Method and Description |
---|---|
void |
draw(com.badlogic.gdx.graphics.g2d.Batch batch,
float parentAlpha)
Draws the actor.
|
float |
getPackedColor()
Gets the color of this Glyph as a packed float color; does not allocate any objects.
|
char |
getSymbol() |
void |
setPackedColor(float color)
Sets the color of this Glyph with the given packed float color; does not allocate any objects.
|
java.lang.String |
toString() |
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, setScale, setScale, setScaleX, setScaleY, setSize, setStage, setTouchable, setUserObject, setVisible, setWidth, setX, setX, setY, setY, setZIndex, sizeBy, sizeBy, sizeChanged, stageToLocalCoordinates, toBack, toFront
public Glyph()
public Glyph(char shown, com.badlogic.gdx.graphics.Color color, float x, float y)
shown
- the char to showcolor
- the Color to use; if null this will instead use SColor.TRANSPARENT
x
- x position in world coordinatesy
- y position in world coordinatespublic Glyph(char shown, float color, float x, float y)
shown
- the char to showcolor
- the packed float color to use, as produced by Color.toFloatBits()
x
- x position in world coordinatesy
- y position in world coordinatespublic char getSymbol()
getSymbol
in interface ICellVisible
public float getPackedColor()
getPackedColor
in interface ICellVisible
public void setPackedColor(float color)
color
- the color to set this Glyph to, as a packed floatpublic java.lang.String toString()
toString
in class com.badlogic.gdx.scenes.scene2d.Actor
public void draw(com.badlogic.gdx.graphics.g2d.Batch batch, float parentAlpha)
Batch.begin()
must have already been called on the batch before this method.draw
in class com.badlogic.gdx.scenes.scene2d.Actor
batch
- the batch should be between begin() and end(), usually handled by StageparentAlpha
- Multiplied with this Glyph's alpha, allowing a parent's alpha to affect all children.Copyright © Eben Howard 2012–2022. All rights reserved.