TextFlag CenterVertically

robot_2Generated
code_blocksInput

Description

The CenterVertically field is a member of the TextFlag enumeration in the Sandbox namespace. It is used to align text or other elements in the center along the Y axis. This flag can be combined with other TextFlag values to achieve the desired alignment.

Usage

Use TextFlag.CenterVertically when you want to center text vertically within a given area. This is particularly useful in UI design where vertical centering is required for aesthetic or functional purposes.

Example

// Example of using TextFlag.CenterVertically
Graphics.DrawText("Hello, World!", new Vector2(100, 100), TextFlag.CenterVertically);