TextFlag Right

book_4_sparkGenerated
code_blocksInput

Description

The TextFlag.Right field is a member of the TextFlag enumeration in the Sandbox namespace. It is used to specify that text should be aligned to the right on the X axis. This flag can be combined with other flags to achieve complex text alignment and positioning.

Usage

Use TextFlag.Right when you need to align text to the right within a given bounding box or area. This is particularly useful in UI design and text rendering where precise control over text alignment is required.

Example

// Example of using TextFlag.Right to align text to the right
Graphics.DrawText("Hello, World!", new Vector2(100, 50), TextFlag.Right);