TextFlag WordWrap

robot_2Generated
code_blocksInput

Description

The WordWrap field is a member of the TextFlag enumeration in the Sandbox namespace. It is used to specify that text should automatically wrap to the next line when it reaches the edge of its container. This is particularly useful for ensuring that text remains readable and fits within a designated area without being cut off.

Usage

Use the WordWrap flag when you want text to automatically wrap within its container. This can be combined with other TextFlag values to achieve the desired text alignment and wrapping behavior.

Example

// Example of using TextFlag.WordWrap
Graphics.DrawText("This is a long text that should wrap within the container.", new Vector2(100, 100), TextFlag.WordWrap);