Text

final case
class Text[M <: Material](text: String, alignment: TextAlignment, fontKey: FontKey, material: M, eventHandler: (Rectangle, GlobalEvent) => List[GlobalEvent], position: Point, rotation: Radians, scale: Vector2, depth: Depth, ref: Point, flip: Flip) extends DependentNode with EventHandler with SpatialModifiers[Text[M]]

Used to draw text onto the screen based on font sprite sheets (images / textures) and a character mapping instance called FontInfo. Text instances are a bit of work to set up, but give super crisp pixel perfect results.

Companion
object
trait Serializable
trait Product
trait Equals
trait SceneNode
class Object
trait Matchable
class Any

Value members

Concrete methods

def alignLeft: Text[M]
def flipHorizontal(isFlipped: Boolean): Text[M]
def flipVertical(isFlipped: Boolean): Text[M]
def modifyMaterial[MB <: Material](alter: M => MB): Text[MB]
def moveBy(pt: Point): Text[M]
def moveBy(x: Int, y: Int): Text[M]
def moveTo(pt: Point): Text[M]
def moveTo(x: Int, y: Int): Text[M]
def onEvent(e: (Rectangle, GlobalEvent) => List[GlobalEvent]): Text[M]
def rotateBy(angle: Radians): Text[M]
def rotateTo(angle: Radians): Text[M]
def scaleBy(amount: Vector2): Text[M]
def scaleBy(x: Double, y: Double): Text[M]
def transformBy(positionDiff: Point, rotationDiff: Radians, scaleDiff: Vector2): Text[M]
def transformTo(newPosition: Point, newRotation: Radians, newScale: Vector2): Text[M]
def withAlignment(newAlignment: TextAlignment): Text[M]
def withDepth(newDepth: Depth): Text[M]
def withFlip(newFlip: Flip): Text[M]
def withFontKey(newFontKey: FontKey): Text[M]
def withMaterial[MB <: Material](newMaterial: MB): Text[MB]
def withPosition(newPosition: Point): Text[M]
def withRef(newRef: Point): Text[M]
def withRef(x: Int, y: Int): Text[M]
def withRotation(newRotation: Radians): Text[M]
def withScale(newScale: Vector2): Text[M]
def withText(newText: String): Text[M]

Inherited methods

def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product

Concrete fields

lazy
val x: Int
lazy
val y: Int