class
GUIToggleField
Inherits:
TGUIField<GUIToggleField>
A composite GUI object representing an editor field.
Editor fields are a combination of a label and an input field. Label is optional. This specific implementation displays a toggle button.
Public
Constructors
GUIToggleField
GUIToggleField(const PrivatelyConstruct &dummy, const GUIContent &labelContent, u32 labelWidth, const String &style, const GUISizeConstraints &dimensions, bool withLabel)
Methods
staticGetGuiTypeName
static const String &GetGuiTypeName()
Returns type name of the GUI element used for finding GUI element styles.
SetValue
void SetValue(bool value)
Current value of the toggle.
GetValue
bool GetValue() const
staticCreate
static T *Create(const GUIContent &labelContent, u32 labelWidth, const String &styleClass = StringUtility::kBlank)
Creates a new GUI editor field with a label.
- labelContent
- Content to display in the editor field label.
- labelWidth
- Width of the label in pixels.
- styleClass
- Style class that will be used for determining GUI element visuals from the current style sheet. If no class is provided, default style is determined based on GUI element type.
Fields
OnValueChanged
Protected
Methods
~GUIToggleField
virtual ~GUIToggleField() noexcept
Triggered when the value of the toggle changes.
ValueChanged
void ValueChanged(bool newValue)
Triggered when the value of the internal toggle button changes.
Fields
mToggle
GUIToggle * mToggle
mValue
bool mValue