// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "Widgets/SWidget.h" #include "IPropertyTypeCustomization.h" #include "PropertyHandle.h" #include "IDetailChildrenBuilder.h" class FDetailWidgetRow; class SScopedModBackingDataWidget; struct FAggregatorDetailsBackingData; /** Details customization for FGameplayEffectExecutionScopedModifierInfo */ class FGameplayEffectExecutionScopedModifierInfoDetails : public IPropertyTypeCustomization { public: static TSharedRef MakeInstance(); /** Overridden to provide the property name */ virtual void CustomizeHeader(TSharedRef StructPropertyHandle, FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils) override; /** Overridden to allow for a custom selection widget for scoped modifiers inside a custom execution */ virtual void CustomizeChildren(TSharedRef StructPropertyHandle, IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils) override; private: /** Delegate called when combo box selection is changed */ void OnBackingDataComboBoxSelectionChanged(TSharedPtr InSelectedItem, ESelectInfo::Type InSelectInfo); /* Called to generate the widgets for custom combo box entries */ TSharedRef OnGenerateBackingDataComboWidget(TSharedPtr InItem); /** Get the current aggregator backing data, if possible; Otherwise falls back to first available definition from execution class */ TSharedPtr GetCurrentBackingData() const; /** Set the current capture definition */ void SetCurrentBackingData(TSharedPtr InBackingData); /** Cached property handle for the overall scoped modifier info struct */ TSharedPtr ScopedModifierStructPropertyHandle; /** Primary backing data widget shown for the custom combo box */ TSharedPtr PrimaryBackingDataWidget; /** Backing source for the custom combo box; Populated by all valid backing data from the execution class */ TArray< TSharedPtr > AvailableBackingData; };