// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "Brushes/SlateImageBrush.h" #include "Widgets/SCompoundWidget.h" #include "Widgets/DeclarativeSyntaxSupport.h" #include "ViewModels/Stack/NiagaraStackViewModel.h" #include "ViewModels/Stack/NiagaraStackFunctionInput.h" #include "ViewModels/Stack/NiagaraStackModuleItem.h" #include "ViewModels/Stack/NiagaraStackValueCollection.h" class SWrapBox; class SScrollBox; class UNiagaraStackViewModel; class UNiagaraStackEntry; class SBox; class SInlineEditableTextBlock; class SNiagaraOverviewInlineParameterBox : public SCompoundWidget { public: SLATE_BEGIN_ARGS(SNiagaraOverviewInlineParameterBox) { _Clipping = EWidgetClipping::OnDemand; } SLATE_END_ARGS(); void Construct(const FArguments& InArgs, UNiagaraStackModuleItem& InStackModuleItem); virtual ~SNiagaraOverviewInlineParameterBox() override; private: /** Selects the module item in the stack and searches for the function input */ FReply NavigateToStack(TWeakObjectPtr FunctionInput); void ConstructChildren(); TArray> GenerateParameterWidgets(); TSharedRef GenerateParameterWidgetFromLocalValue(UNiagaraStackFunctionInput* FunctionInput); TSharedRef GenerateParameterWidgetFromDataInterface(UNiagaraStackFunctionInput* FunctionInput); /** We build a substitute map of entries that we want to */ TWeakObjectPtr FindSubstituteEntry(const UNiagaraStackFunctionInput* Input); void OnModuleItemStructureChanged(ENiagaraStructureChangedFlags); private: /** The module item whose parameters this box is representing */ TWeakObjectPtr ModuleItem; TSharedPtr Container; /** We keep track of the function inputs we are observing through this parameter box so we can unbind the delegates later */ TArray> BoundFunctionInputs; TArray ImageBrushes; };