Class BitmapText
java.lang.Object
com.codingame.gameengine.module.entities.Entity<T>
com.codingame.gameengine.module.entities.BlendableEntity<T>
com.codingame.gameengine.module.entities.TextureBasedEntity<T>
com.codingame.gameengine.module.entities.TextBasedEntity<BitmapText>
com.codingame.gameengine.module.entities.BitmapText
Represents a label on screen, you can use any bitmap font in your asset folder as it's font.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.codingame.gameengine.module.entities.TextBasedEntity
TextBasedEntity.TextAlign
Nested classes/interfaces inherited from class com.codingame.gameengine.module.entities.BlendableEntity
BlendableEntity.BlendMode
-
Field Summary
Fields inherited from class com.codingame.gameengine.module.entities.TextBasedEntity
fontSize, maxWidth, text, textAlign
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetFont()
Returns the name of the font of thisBitmapText
in px.Sets the name of the font of thisBitmapText
.Methods inherited from class com.codingame.gameengine.module.entities.TextBasedEntity
getFontSize, getMaxWidth, getText, getTextAlign, setFontSize, setFontSize, setMaxWidth, setText, setTextAlign
Methods inherited from class com.codingame.gameengine.module.entities.TextureBasedEntity
getAnchorX, getAnchorY, getTint, setAnchor, setAnchorX, setAnchorX, setAnchorY, setAnchorY, setTint, setTint
Methods inherited from class com.codingame.gameengine.module.entities.BlendableEntity
getBlendMode, setBlendMode
Methods inherited from class com.codingame.gameengine.module.entities.Entity
getAlpha, getId, getMask, getParent, getRotation, getScaleX, getScaleY, getSkewX, getSkewY, getX, getY, getZIndex, isVisible, requireValidAlpha, requireValidColor, self, set, set, setAlpha, setAlpha, setMask, setMask, setRotation, setRotation, setScale, setScale, setScaleX, setScaleX, setScaleY, setScaleY, setSkewX, setSkewX, setSkewY, setSkewY, setVisible, setX, setX, setY, setY, setZIndex
-
Constructor Details
-
BitmapText
public BitmapText()
-
-
Method Details
-
getFont
Returns the name of the font of thisBitmapText
in px.Default is null.
- Returns:
- the size of the font of this
BitmapText
.
-
setFont
Sets the name of the font of thisBitmapText
.Only fonts available to the browser can be displayed.
Default is null.
- Parameters:
font
- the size for the font of thisBitmapText
.- Returns:
- this
BitmapText
. - Throws:
NullPointerException
- if font is null.
-