Description
The TextFlag.Top
field is a member of the TextFlag
enumeration in the Sandbox namespace. It is used to anchor text or other elements to the top on the Y axis. This flag can be combined with other flags to achieve complex text alignment and positioning.
Usage
Use TextFlag.Top
when you want to align text or elements to the top of a container or area. This is particularly useful in UI design where vertical alignment is required.
Example
// Example of using TextFlag.Top in a text drawing function
Graphics.DrawText("Hello, World!", new Vector2(100, 50), TextFlag.Top | TextFlag.CenterHorizontally);