FColorStructCustomization

Base class for color struct customization ([FColor](API\Runtime\Core\Math\FColor),[FLinearColor](API\Runtime\Core\Math\FLinearColor)).

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

DetailCustomizations

Header

/Engine/Source/Editor/DetailCustomizations/Public/Customizations/ColorStructCustomization.h

Include

#include "Customizations/ColorStructCustomization.h"

Syntax

class FColorStructCustomization : public FMathStructCustomization

Remarks

Base class for color struct customization (FColor,FLinearColor).

Variables

Name Description

Protected variable

bool

 

bDontUpdateWhileEditing

The value won;t be updated while editing

Protected variable

bool

 

bIgnoreAlpha

True if the property wants to ignore the alpha component

Protected variable

bool

 

bIsInlineColorPickerVisible

True if the inline color picker is visible

Protected variable

bool

 

bIsInteractive

True if the user is performing an interactive color change

Protected variable

bool

 

bIsLinearColor

True if the property is a linear color property

Protected variable

TSharedPtr< SWi...

 

ColorPickerParentWidget

Cached widget for the color picker to use as a parent

Protected variable

TArray< FLinear...

 

SavedPreColorPickerColors

Saved per struct colors in case the user clicks cancel in the color picker

Protected variable

TOptional< bool...

 

sRGBOverride

Overrides the default state of the sRGB check box

Protected variable

TSharedPtr< IPr...

 

StructPropertyHandle

Color struct handle

Constructors

Name Description

Protected function

FColorStructCustomization()

Functions

Name Description

Protected function

void

 

CreateColorPicker

(
    bool bUseAlpha
)

Creates a new color picker for interactively selecting the color

Protected function

TSharedRef< ...

 

CreateColorWidget

(
    TWeakPtr< IPropertyHandle >
)

Creates the color widget that when clicked spawns the color picker window.

Protected function

TSharedRef< ...

 

CreateInlineColorPicker

(
    TWeakPtr< IPropertyHandle >
)

Creates a new color picker for interactively selecting color

Protected function Const

FPropertyAcc...

 

GetColorAsLinear

(
    FLinearColor& InColor
)

Get the color used by this struct as a linear color value

Protected function Const

EVisibility

 

GetMultipleValuesTextVisibility()

Does this struct have multiple values?

Public function Static

TSharedRef< ...

 

MakeInstance()

Protected function

void

 

OnColorPickerCancelled

(
    FLinearColor OriginalColor
)

Called when the user clicks cancel in the color picker The values are reset to their original state when this happens

Protected function

void

 

OnColorPickerInteractiveBegin()

Called when the user enters an interactive color change (dragging something in the picker)

Protected function

void

 

OnColorPickerInteractiveEnd()

Called when the user completes an interactive color change (dragging something in the picker)

Protected function

void

 

OnColorPickerWindowClosed

(
    const TSharedRef< SWindow >& Windo...
)

Called when the color picker window is clsoed

Protected function Const

FLinearColor

 

OnGetColorForColorBlock()

Protected function

FReply

 

OnMouseButtonDownColorBlock

(
    const FGeometry& MyGeometry,
    const FPointerEvent& MouseEvent
)

Called when the user clicks in the color block (opens inline color picker)

Protected function

FReply

 

OnOpenFullColorPickerClicked()

Called when the user clicks on the the button to get the full color picker

Protected function

void

 

OnSetColorFromColorPicker

(
    FLinearColor NewColor
)

Called when the property is set from the color picker

Overridden from FMathStructCustomization

Name Description

Protected function Virtual

void

 

GetSortedChildren

(
    TSharedRef< IPropertyHandle > Struc...,
    TArray< TSharedRef< IPropertyHandle...
)

Gets the sorted children for the struct

Protected function Virtual

void

 

MakeHeaderRow

(
    TSharedRef< IPropertyHandle >& Str...,
    FDetailWidgetRow& Row
)

Makes the header row for the customization

Overridden from IPropertyTypeCustomization

Name Description

Protected function Virtual

void

 

CustomizeHeader

(
    TSharedRef< IPropertyHandle > Struc...,
    FDetailWidgetRow& HeaderRow,
    IPropertyTypeCustomizationUtils& S...
)

IPropertyTypeCustomization instance

Classes

Name

Description

Protected struct

FLinearOrSrgbColor

Stores a linear or srb color without converting between the two. Only one is valid at a time

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss