SetTextAlign

Category: Window and Display

Back to System Functions


Signature

SetTextAlign(horizontal As Double, vertical As Double)

Returns

Void

Description

Sets the alignment factors used by subsequent DrawText calls.

A value of 0 uses left or top alignment, and a value of 1 uses right or bottom alignment.

Fractional values are allowed, such as 0.5 for centered alignment.

Example

SetTextAlign(0.5, 0.5) DrawText(uiFont, ScreenWidth() / 2, ScreenHeight() / 2, "Score")