class GUIColorGradientField

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 color gradient input field.

Public

Methods

staticGetGuiTypeName

static const String &GetGuiTypeName()

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

GetValue

T GetValue() const

Returns the value of the field.

SetValue

void SetValue(const T &value)

Changes the value of the field.

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

OnClicked

Event<void ()> OnClicked

Triggered when the user clicks on the gradient field.

Internal

Methods

CalculateUnconstrainedOptimalSize

GUILogicalSize CalculateUnconstrainedOptimalSize() const override

Calculates the optimal size for the GUI element, ignoring size constraints.

Protected

Methods

Clicked

void Clicked()

Triggered when the child color input field is clicked on.

Fields

mLabelWidth

u32 mLabelWidth

mValue

T mValue

mLabel

GUILabel * mLabel

mGradient

TGUI * mGradient