// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CustomizableObjectInstanceEditor.h" #include "Widgets/SBoxPanel.h" class UPointLightComponent; class SCustomizableObjectEditorViewportTabBody; class ICustomizableObjectInstanceEditor; namespace ESelectInfo { enum Type : int; } namespace ETextCommit { enum Type : int; } template class SListView; class SWidget; class SEditableTextBox; class SComboButton; class UCustomizableObject; struct FAssetData; struct FGeometry; struct FPointerEvent; /** * Custom slate that grants the user the ability of adding, moving and removing lights from the preview scene. */ class SCustomizableObjectCustomSettings : public SVerticalBox { public: SLATE_BEGIN_ARGS(SCustomizableObjectCustomSettings) {} SLATE_ARGUMENT(UCustomSettings*, PreviewSettings) SLATE_END_ARGS() void Construct(const FArguments& InArgs); void SetViewportLightsByAsset(const FAssetData& InAsset); private: TSharedRef GetLightComboButtonContent(); void CloseLightComboButtonContent(); FReply OnSaveViewportLightsAsset() const; FReply OnNewViewportLightsAsset() const; FReply OnPointLightAdded() const; FReply OnSpotLightAdded() const; FReply OnLightRemoved() const; FReply OnLightUnselected(); TSharedRef OnGenerateWidgetForList(TSharedPtr Item, const TSharedRef& OwnerTable); void OnListSelectionChanged(TSharedPtr Selection, ESelectInfo::Type SelectInfo); // LightProperties TOptional GetIntensityValue() const; void OnIntensityValueCommited(float Value, ETextCommit::Type CommitType); FLinearColor GetLightColorValue() const; FReply OnLightColorBlockMouseButtonDown(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent); void OnSetLightColorFromColorPicker(FLinearColor InColor); TOptional GetAttenuationRadius() const; void OnAttenuationRadiusValueCommited(float Value, ETextCommit::Type CommitType); TOptional GetLightSourceRadius() const; void OnLightSourceRadiusValueCommited(float Value, ETextCommit::Type CommitType); TOptional GetLightSourceLength() const; void OnLightSourceLengthValueCommited(float Value, ETextCommit::Type CommitType); TOptional GetLightInnerConeAngle() const; void OnLightInnerConeAngleValueCommited(float Value, ETextCommit::Type CommitType); TOptional GetLightOuterConeAngle() const; void OnLightOuterConeAngleValueCommited(float Value, ETextCommit::Type CommitType); TSharedPtr GetEditorChecked() const; TArray> LightNames; static const FString LightPackagePath; TSharedPtr LightsAssetNameInputText; TSharedPtr LightComboButton; TSharedPtr>> LightsListView; TSharedPtr PointLightProperties; TSharedPtr SpotLightProperties; TWeakPtr WeakEditor; TWeakPtr WeakViewport; };