// Copyright 2019-Present LexLiu. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "IDetailCustomization.h" #include "Widgets/Layout/SBox.h" #include "Input/Reply.h" #include "UObject/WeakObjectPtr.h" #include "Framework/Docking/TabManager.h" #include "Widgets/SCompoundWidget.h" class ULGUIPrefabSequenceComponent; class ULGUIPrefabSequence; class SLGUIPrefabSequenceEditorWidget; struct FWidgetAnimationListItem; class ULGUIPrefabHelperObject; class SLGUIPrefabSequenceEditor : public SCompoundWidget { public: ~SLGUIPrefabSequenceEditor(); SLATE_BEGIN_ARGS(SLGUIPrefabSequenceEditor) {} SLATE_END_ARGS(); void Construct(const FArguments& InArgs); void AssignLGUIPrefabSequenceComponent(TWeakObjectPtr InSequenceComponent); ULGUIPrefabSequence* GetLGUIPrefabSequence() const; ULGUIPrefabSequenceComponent* GetSequenceComponent()const { return WeakSequenceComponent.Get(); } void RefreshAnimationList(); void OnEditingPrefabChanged(AActor* RootActor); private: TWeakObjectPtr WeakSequenceComponent; FDelegateHandle OnObjectsReplacedHandle; FDelegateHandle EditingPrefabChangedHandle; FDelegateHandle OnBeforeApplyPrefabHandle; void OnBeforeApplyPrefab(ULGUIPrefabHelperObject* InObject); TSharedPtr PrefabSequenceEditor; TSharedPtr>> AnimationListView; TArray< TSharedPtr > Animations; int32 CurrentSelectedAnimationIndex = 0; TSharedRef OnGenerateRowForAnimationListView(TSharedPtr InListItem, const TSharedRef& InOwnerTableView); void OnAnimationListViewSelectionChanged(TSharedPtr InListItem, ESelectInfo::Type InSelectInfo); void OnItemScrolledIntoView(TSharedPtr InListItem, const TSharedPtr& InWidget) const; FReply OnNewAnimationClicked(); TSharedPtr SearchBoxPtr; void OnAnimationListViewSearchChanged(const FText& InSearchText); TSharedPtr OnContextMenuOpening()const; TSharedPtr CommandList; void CreateCommandList(); void OnDuplicateAnimation(); void OnDeleteAnimation(); void OnRenameAnimation(); void OnObjectsReplaced(const TMap& ReplacementMap); };