TextBox

indigo.shared.scenegraph.TextBox
See theTextBox companion object
final case class TextBox(text: String, style: TextStyle, size: Size, eventHandlerEnabled: Boolean, eventHandler: ((TextBox, GlobalEvent)) => Option[GlobalEvent], position: Point, rotation: Radians, scale: Vector2, depth: Depth, ref: Point, flip: Flip) extends RenderNode[TextBox], SpatialModifiers[TextBox]

Used to draw text on the screen quickly based on a font. Much quicker and eaiser to use that Text, however suffers from all the problems of browser rendered fonts, most notably, you cannot have pixel perfect fonts (fine for mock-ups of HD UI layers perhaps).

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait SceneNode
class Object
trait Matchable
class Any
Show all

Members list

Type members

Inherited types

type Out = T

Attributes

Inherited from:
RenderNode

Value members

Concrete methods

def bold: TextBox
def flipHorizontal(isFlipped: Boolean): TextBox
def flipVertical(isFlipped: Boolean): TextBox
def modifyStyle(modifier: TextStyle => TextStyle): TextBox
def moveBy(pt: Point): TextBox
def moveBy(x: Int, y: Int): TextBox
def moveTo(pt: Point): TextBox
def moveTo(x: Int, y: Int): TextBox
def onEvent(f: PartialFunction[(TextBox, GlobalEvent), GlobalEvent]): TextBox
def rotateBy(angle: Radians): TextBox
def rotateTo(angle: Radians): TextBox
def scaleBy(amount: Vector2): TextBox
def scaleBy(x: Double, y: Double): TextBox
def transformBy(positionDiff: Point, rotationDiff: Radians, scaleDiff: Vector2): TextBox
def transformTo(newPosition: Point, newRotation: Radians, newScale: Vector2): TextBox
def withColor(newColor: RGBA): TextBox
def withDepth(newDepth: Depth): TextBox
def withFlip(newFlip: Flip): TextBox
def withFontFamily(newFamily: FontFamily): TextBox
def withFontSize(newSize: Pixels): TextBox
def withPosition(newPosition: Point): TextBox
def withRef(newRef: Point): TextBox
def withRef(x: Int, y: Int): TextBox
def withRotation(newRotation: Radians): TextBox
def withScale(newScale: Vector2): TextBox
def withSize(newSize: Size): TextBox
def withStroke(newStroke: TextStroke): TextBox
def withText(newText: String): TextBox
def withTextStyle(newStyle: TextStyle): TextBox

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

lazy val x: Int
lazy val y: Int