Description
The RightCenter
field is a member of the TextFlag
enumeration in the Sandbox namespace. It is used to specify the alignment of text or other elements such that they are anchored to the right side and centered vertically. This flag is part of a set of flags that dictate the positioning of text, allowing for flexible alignment options.
Usage
Use the RightCenter
flag when you need to align text or elements to the right side of a container while keeping them centered vertically. This can be particularly useful in UI design where consistent alignment is required across different components.
Combine RightCenter
with other TextFlag
values to achieve complex alignment behaviors, but be cautious of conflicting flags as they may lead to undefined behavior.
Example
// Example of using TextFlag.RightCenter
Graphics.DrawText("Hello, World!", new Vector2(100, 50), TextFlag.RightCenter);