You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rnx #rb none #ROBOMERGE-SOURCE: CL 10869241 via CL 10869527 via CL 10869904 #ROBOMERGE-BOT: (v613-10869866) [CL 10870586 by ryan durand in Main branch]
63 lines
2.1 KiB
C++
63 lines
2.1 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Layout/Visibility.h"
|
|
#include "Widgets/SWidget.h"
|
|
#include "UnrealClient.h"
|
|
#include "IPropertyTypeCustomization.h"
|
|
|
|
class FDetailWidgetRow;
|
|
class IDetailChildrenBuilder;
|
|
class IPropertyHandle;
|
|
|
|
/**
|
|
* Class for FParticleSysParam struct customization
|
|
*/
|
|
class FParticleSysParamStructCustomization : public IPropertyTypeCustomization
|
|
{
|
|
public:
|
|
static TSharedRef<IPropertyTypeCustomization> MakeInstance();
|
|
|
|
FParticleSysParamStructCustomization();
|
|
|
|
/** IPropertyTypeCustomization instance */
|
|
virtual void CustomizeHeader(TSharedRef<IPropertyHandle> StructPropertyHandle, FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils) override;
|
|
virtual void CustomizeChildren(TSharedRef<IPropertyHandle> StructPropertyHandle, IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils) override;
|
|
|
|
protected:
|
|
|
|
/** Called by the combo box to generate each row of the widget */
|
|
TSharedRef<SWidget> OnGenerateComboWidget(TSharedPtr<FString> InComboString);
|
|
|
|
/** Called when the combo box selection changes, when a new parameter type is selected */
|
|
void OnComboSelectionChanged(TSharedPtr<FString> InSelectedItem, ESelectInfo::Type SelectInfo);
|
|
|
|
/** Called to obtain an FText representing the current combo box selection */
|
|
FText GetParameterTypeName() const;
|
|
|
|
private:
|
|
|
|
/** Cached handle to the struct property */
|
|
TSharedPtr<IPropertyHandle> PropertyHandle;
|
|
|
|
/** Current parameter type */
|
|
int32 ParameterType;
|
|
|
|
/** A list of parameter type names */
|
|
TArray<TSharedPtr<FString>> ParameterTypeNames;
|
|
|
|
/** A list of parameter type tooltips */
|
|
TArray<FText> ParameterTypeToolTips;
|
|
|
|
/** Delegates called by each property widget to determine their visibility */
|
|
EVisibility GetScalarVisibility() const;
|
|
EVisibility GetScalarLowVisibility() const;
|
|
EVisibility GetVectorVisibility() const;
|
|
EVisibility GetVectorLowVisibility() const;
|
|
EVisibility GetColorVisibility() const;
|
|
EVisibility GetActorVisibility() const;
|
|
EVisibility GetMaterialVisibility() const;
|
|
};
|