class MAGES::CharacterController::Editor::UIUtil¶
Overview¶
UI Utils class to quickly generate UIs. More…
class UIUtil
{
public:
// methods
static VisualElement CreateVisualElement(string name, FlexDirection direction);
static Label CreateLabel(string text, float widthPercent, string tooltip = null);
static Button CreateButton(string text, float widthPercent, Color color);
static ObjectField CreateObjectField(
string name,
string label,
System.Type objectType
);
};
Detailed Documentation¶
UI Utils class to quickly generate UIs.
Methods¶
static VisualElement CreateVisualElement(string name, FlexDirection direction)
Creates a Visual Element UI.
Parameters:
name |
The name of the container. |
direction |
The direction the elements are aligned. |
Returns:
VisualElement.
static Label CreateLabel(string text, float widthPercent, string tooltip = null)
Creates a label UI.
Parameters:
text |
The text of the label. |
widthPercent |
The width of the label. |
tooltip |
The tooltip. |
Returns:
Label.
static Button CreateButton(string text, float widthPercent, Color color)
Creates a button UI.
Parameters:
text |
The button text. |
widthPercent |
The button width. |
color |
The color of the button. |
Returns:
Button.
static ObjectField CreateObjectField(
string name,
string label,
System.Type objectType
)
Creates an Object Field UI.
Parameters:
name |
The name of the Object Field. |
label |
The label of the Object Field. |
objectType |
The Object Type of the Object Field. |
Returns:
ObjectField.