VISU - PHP Game Framework

TextLabel
in package

Table of Contents

Properties

$align  : TextLabelAlign
Alignment of the text.
$color  : Vec4
The color of the text.
$isStatic  : bool
Is this label static? Meaing the label is not influenced by the camera transform.
$text  : string
$transform  : Transform
$isDirty  : bool
Dirty flag, set to true if the text has changed.

Methods

__construct()  : void
Constructor
isDirty()  : bool
Returns boolean true if the text has changed since the last render.
markClean()  : void
Mark the text as clean.
markDirty()  : void
Manually marks the text as dirty.
updateColor()  : void
Updates the color and sets the dirty flag.
updateText()  : void
Updates the text and sets the dirty flag.

Properties

$align

Alignment of the text.

public TextLabelAlign $align = \VISU\Graphics\Rendering\Renderer\TextLabelRenderer\TextLabelAlign::center

$color

The color of the text.

public Vec4 $color

$isStatic

Is this label static? Meaing the label is not influenced by the camera transform.

public bool $isStatic = false

$isDirty

Dirty flag, set to true if the text has changed.

private bool $isDirty = true

Methods

__construct()

Constructor

public __construct(string $text, Transform $transform) : void
Parameters
$text : string
$transform : Transform

isDirty()

Returns boolean true if the text has changed since the last render.

public isDirty() : bool
Return values
bool

markClean()

Mark the text as clean.

public markClean() : void

markDirty()

Manually marks the text as dirty.

public markDirty() : void

updateColor()

Updates the color and sets the dirty flag.

public updateColor(Vec4 $color) : void
Parameters
$color : Vec4

updateText()

Updates the text and sets the dirty flag.

public updateText(string $text) : void
Parameters
$text : string

        
On this page

Search results