TextFlag RightCenter

book_4_sparkGenerated
code_blocksInput

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 within a given area.

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 necessary across different components.

Example

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