Loading...
Searching...
No Matches
realvirtual.EnumField< T > Class Template Reference
Public Member Functions | |
| EnumField (string label, T initialValue) | |
| Creates a new EnumField with the specified initial value. | |
| void | BuildUI (RuntimeUIBuilder builder) |
| Builds the UI for this enum field using the provided builder. | |
| void | SetValue (T newValue) |
| Sets the enum value and updates the UI. | |
| T | GetValue () |
| Gets the current enum value. | |
Properties | |
| T | Value [get] |
| Current enum value. | |
| string | Label [get, set] |
| Label text displayed above the enum buttons. | |
| rvUIContainer | Container [get] |
| Container holding the enum field UI. | |
| bool | UseHorizontalLayout [get, set] |
| Whether to use horizontal or vertical layout for buttons. | |
Events | |
| Action< T > | OnValueChanged |
| Event fired when the enum value changes. | |
Constructor & Destructor Documentation
◆ EnumField()
| realvirtual.EnumField< T >.EnumField | ( | string | label, |
| T | initialValue | ||
| ) |
Creates a new EnumField with the specified initial value.
- Parameters
-
label Label text initialValue Initial enum value
Member Function Documentation
◆ BuildUI()
| void realvirtual.EnumField< T >.BuildUI | ( | RuntimeUIBuilder | builder | ) |
Builds the UI for this enum field using the provided builder.
- Parameters
-
builder RuntimeUIBuilder to use
◆ GetValue()
| T realvirtual.EnumField< T >.GetValue | ( | ) |
Gets the current enum value.
◆ SetValue()
| void realvirtual.EnumField< T >.SetValue | ( | T | newValue | ) |
Sets the enum value and updates the UI.
- Parameters
-
newValue New enum value
Property Documentation
◆ Container
|
get |
Container holding the enum field UI.
◆ Label
|
getset |
Label text displayed above the enum buttons.
◆ UseHorizontalLayout
|
getset |
Whether to use horizontal or vertical layout for buttons.
◆ Value
|
get |
Current enum value.
Event Documentation
◆ OnValueChanged
| Action< T> realvirtual.EnumField< T >.OnValueChanged |
Event fired when the enum value changes.