Header menu logo Mibo

TextState Module

Convenience builders for TextState.

Functions and values

Function or value Description

create (font, text, position)

Full Usage: create (font, text, position)

Parameters:
Returns: TextState

Creates a text state with required fields. Defaults: Scale=1.0, Color=White, Layer=0.

font : SpriteFont
text : string
position : Vector2
Returns: TextState

withColor v s

Full Usage: withColor v s

Parameters:
Returns: TextState
Modifiers: inline

Sets the tint color.

v : Color
s : TextState
Returns: TextState

withLayer v s

Full Usage: withLayer v s

Parameters:
Returns: TextState
Modifiers: inline

Sets the render layer.

v : int<MeasureProduct<RenderLayer, MeasureOne>>
s : TextState
Returns: TextState

withScale v s

Full Usage: withScale v s

Parameters:
Returns: TextState
Modifiers: inline

Sets the uniform scale factor (1.0 = default font size).

v : float32
s : TextState
Returns: TextState

Type something to start searching.