class GUIArea2Field

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 an Area2 input field.

Public

Constructors

GUIArea2Field

GUIArea2Field(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.

GetValue

Area2 GetValue() const

Returns the value of the input field.

SetValue

void SetValue(const Area2 &value)

Sets a new value in the input field.

HasInputFocus

bool HasInputFocus() const

Checks is the input field currently active.

SetInputFocus

void SetInputFocus(AreaComponent component, bool focus)

Sets input focus to a specific component's input box.

SetTint

void SetTint(const Color &color) override

Sets the tint of the GUI element.

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

Event<void (const Area2 &)> OnValueChanged

Reports the new value of the area when the user changes the value of any of the area components.

OnComponentChanged

Event<void (float, AreaComponent)> OnComponentChanged

Reports the new value of an individual area component when the user changes it.

OnComponentFocusGained

Event<void (AreaComponent)> OnComponentFocusGained

Triggered when an individual component gains focus.

OnComponentFocusLost

Event<void (AreaComponent)> OnComponentFocusLost

Triggered when an individual component loses focus.

OnConfirm

Event<void (AreaComponent)> OnConfirm

Triggered when the user hits the Enter key with any of the component input boxes in focus.

Protected

Methods

ValueChanged

void ValueChanged(float newValue, AreaComponent component)

Triggered when the values in any of the input boxes change.

InputConfirmed

void InputConfirmed(AreaComponent component)

Triggered when the users confirms input in the input box.

Fields

mFieldX

GUIFloatField * mFieldX

mFieldY

GUIFloatField * mFieldY

mFieldWidth

GUIFloatField * mFieldWidth

mFieldHeight

GUIFloatField * mFieldHeight