class GUIColorDistributionField

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 color distribution.

Public

Constructors

GUIColorDistributionField

GUIColorDistributionField(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

ColorDistribution GetValue() const

Returns the value of the field.

SetValue

void SetValue(const ColorDistribution &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.

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

OnMinClicked

Event<void ()> OnMinClicked

Triggered when the user clicks on the minimum value display for the distribution.

OnMaxClicked

Event<void ()> OnMaxClicked

Triggered when the user clicks on the maximum value display for the distribution.

Protected

Methods

Rebuild

void Rebuild()

Rebuilds the internal GUI components for the current property type.

Fields

mValue

ColorDistribution mValue

mDropDownButton

GUIButton * mDropDownButton

mMinColorField

GUIColorField * mMinColorField

mMaxColorField

GUIColorField * mMaxColorField

mMinGradientField

GUIColorGradientField * mMinGradientField

mMaxGradientField

GUIColorGradientField * mMaxGradientField

mLabels

std::array<GUILabel *, 2> mLabels

mPropertyType

mMinConstant

Color mMinConstant

mMaxConstant

Color mMaxConstant

mMinGradient

ColorGradient mMinGradient

mMaxGradient

ColorGradient mMaxGradient

mContextMenu

SPtr<GUIContextMenu> mContextMenu