Description
The Justify
field is a member of the TextFlag
enumeration in the Sandbox namespace. It is used to specify text alignment options, particularly for justifying text within a given space. This flag can be combined with other TextFlag
values to achieve complex text alignment behaviors.
Usage
Use the Justify
flag when you want text to be spread out evenly across a line, ensuring that the text fills the entire width of the container. This is particularly useful in scenarios where text needs to be aligned in a visually balanced manner across a horizontal space.
Example
// Example of using TextFlag.Justify
Graphics.DrawText("This is a justified text example.", new Vector2(100, 100), TextFlag.Justify | TextFlag.Top);