Description
The CenterBottom
field is a member of the TextFlag
enumeration in the Sandbox namespace. It is used to specify that text or other elements should be anchored to the bottom side of a container and centered horizontally. This flag is part of a set of flags that dictate the positioning of text and other elements within a graphical interface.
Usage
Use the CenterBottom
flag when you want to align text or elements to the bottom center of a container. This can be particularly useful in UI design where specific alignment is required for aesthetic or functional purposes.
Combine this flag with other TextFlag
values to achieve the desired alignment. Note that combining conflicting flags (e.g., Left
and Right
) may result in undefined behavior.
Example
// Example of using TextFlag.CenterBottom
Graphics.DrawText("Hello, World!", new Vector2(100, 100), TextFlag.CenterBottom);