FColorStructCustomization

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

Unreal Engine C++ API Reference > Editor > DetailCustomizations > Customizations

Inheritance Hierarchy

References

   
Module DetailCustomizations
Header /Engine/Source/Editor/DetailCustomizations/Public/Customizations/ColorStructCustomization.h
Include #include "Customizations/ColorStructCustomization.h"

Syntax

class FColorStructCustomization : public [FMathStructCustomization](API\Editor\DetailCustomizations\Customizations\FMathStructCustomization)  

Remarks

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

Variables

Type Name Description
bool bDontUpdateWhileEditing The value won;t be updated while editing
bool bIgnoreAlpha True if the property wants to ignore the alpha component
bool bIsInlineColorPickerVisible True if the inline color picker is visible
bool bIsInteractive True if the user is performing an interactive color change
bool bIsLinearColor True if the property is a linear color property
TSharedPtr< SWi... ColorPickerParentWidget Cached widget for the color picker to use as a parent
TSharedPtr< SWi... ColorWidgetBackgroundBorder  
FString LastPickerColorString Last color set from color picker as string
TArray< FLinear... SavedPreColorPickerColors Saved per struct colors in case the user clicks cancel in the color picker
TOptional< bool... sRGBOverride Overrides the default state of the sRGB check box
TSharedPtr< IPr... StructPropertyHandle Color struct handle

Constructors

Type Name Description
  FColorStructCustomization ()  

Destructors

Type Name Description
  ~FColorStructCustomization ()  

Functions

Type Name Description
void CreateColorPicker ( bool bUseAlpha ) Creates a new color picker for interactively selecting the color
TSharedRef< ... CreateColorWidget ( TWeakPtr< IPropertyHandle > ) Creates the color widget that when clicked spawns the color picker window.
TSharedRef< ... CreateInlineColorPicker ( TWeakPtr< IPropertyHandle > ) Creates a new color picker for interactively selecting color
FPropertyAcc... GetColorAsLinear ( FLinearColor& InColor ) Get the color used by this struct as a linear color value
FSlateColor GetColorWidgetBorderColor ()  
EVisibility GetMultipleValuesTextVisibility () Does this struct have multiple values?
TSharedRef< ... MakeInstance ()  
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
void OnColorPickerInteractiveBegin () Called when the user enters an interactive color change (dragging something in the picker)
void OnColorPickerInteractiveEnd () Called when the user completes an interactive color change (dragging something in the picker)
void OnColorPickerWindowClosed ( const TSharedRef< SWindow >& Windo... ) Called when the color picker window is clsoed
FLinearColor OnGetColorForColorBlock ()  
FSlateColor OnGetSlateColorForBlock ()  
FReply OnMouseButtonDownColorBlock ( const FGeometry& MyGeometry, const FPointerEvent& MouseEvent ) Called when the user clicks in the color block (opens inline color picker)
FReply OnOpenFullColorPickerClicked () Called when the user clicks on the the button to get the full color picker
void OnSetColorFromColorPicker ( FLinearColor NewColor ) Called when the property is set from the color picker
void ResetColors () Called to reset all colors to before the color picker spawned

Overridden from FMathStructCustomization

Type Name Description
void GetSortedChildren ( TSharedRef< IPropertyHandle > Struc..., TArray< TSharedRef< IPropertyHandle... ) Gets the sorted children for the struct
void MakeHeaderRow ( TSharedRef< IPropertyHandle >& Str..., FDetailWidgetRow& Row ) Makes the header row for the customization

Overridden from IPropertyTypeCustomization

Type Name Description
void CustomizeHeader ( TSharedRef< IPropertyHandle > Struc..., FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& S... ) IPropertyTypeCustomization instance

Classes

Type Name Description
Protected struct FLinearOrSrgbColor Stores a linear or srb color without converting between the two. Only one is valid at a time

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library