class GUIVector3DistributionField

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 input field for a 3D vector distribution.

Public

Methods

staticGetGuiTypeName

static const String &GetGuiTypeName()

Returns type name of the GUI element used for finding GUI element styles.

GetValue

TDistribution<T> GetValue() const

Returns the value of the field.

SetValue

void SetValue(const TDistribution<T> &value)

Changes the value of the field.

GetDistributionType

PropertyDistributionType GetDistributionType() const

Returns the type of the currently selected distribution.

SetTint

void SetTint(const Color &color) override

Sets the tint of the GUI element.

HasInputFocus

bool HasInputFocus() const

Checks if any of the float input fields currently have input focus.

Only relevant for non-curve distributions.

SetInputFocus

void SetInputFocus(RangeComponent rangeComponent, VectorComponent vectorComponent, bool focus)

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

rangeComponent
Whether to focus on the minimum or the maximum part of the range. Only relevant if the distribution represents a constant range.
vectorComponent
Vector component to focus on. Only relevant of the distribution constant is a vector type, and if the current distribution type is a non-curve (constant) type.
focus
True to enable focus, false to disable.

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

OnClicked

Event<void (VectorComponent)> OnClicked

Triggered when the user clicks on the curve display.

Only relevant if the distribution is a curve distribution. Provides the index of the clicked curve.

OnConstantModified

Event<void (RangeComponent, VectorComponent)> OnConstantModified

Triggered when the user modifies the value of the non-curve (constant) values of the distribution.

Only relevant if the distribution is not a curve distribution.

OnConstantConfirmed

Event<void (RangeComponent, VectorComponent)> OnConstantConfirmed

Triggered when the user confirms inputs in the non-curve (constant) values of the distribution.

Only relevant if the distribution is not a curve distribution.

OnConstantFocusGained

Event<void (RangeComponent, VectorComponent)> OnConstantFocusGained

Triggered when a GUI field representing an individual component gains focus.

This only applies to input fields representing the non-curve (constant) distribution types.

OnConstantFocusLost

Event<void (RangeComponent, VectorComponent)> OnConstantFocusLost

Triggered when a GUI field representing an individual component loses focus.

This only applies to input fields representing the non-curve (constant) distribution types.

Protected

Methods

Rebuild

void Rebuild()

Rebuilds the internal GUI components for the current property type.

Fields

mValue

TDistribution<T> mValue

mDropDownButton

GUIButton * mDropDownButton

mMinInput

GUIConstantType * mMinInput

mMaxInput

GUIConstantType * mMaxInput

mLabels

std::array<GUILabel *, 2> mLabels

mCurveDisplay

GUICurvesField *[NumComponents] mCurveDisplay

mPropertyType

mMinConstant

T mMinConstant

mMaxConstant

T mMaxConstant

mMinCurve

TAnimationCurve<float>[NumComponents] mMinCurve

mMaxCurve

TAnimationCurve<float>[NumComponents] mMaxCurve

mContextMenu

SPtr<GUIContextMenu> mContextMenu