You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Simplied the task icon - Created common treeview for States, used for state selection and outliner view - Added common functions to describe state links and transitions - Made custom expander arrow the main tree view - Move the task lits on separate row on the main tree view - Added enter condition list for on main tree view - Clicking on tasks or enter conditions highlight them in the details panel - Added state outliner which displays the state list compactly - Added feedback for the drag and drop, and moved the code to separate file #rb Yoan.StAmant [CL 35239895 by mikko mononen in ue5-main branch]
71 lines
2.3 KiB
C++
71 lines
2.3 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "Widgets/SCompoundWidget.h"
|
|
#include "Widgets/Views/STreeView.h"
|
|
|
|
class UStateTree;
|
|
class FStateTreeViewModel;
|
|
class SCompactStateTreeView;
|
|
struct FPropertyChangedEvent;
|
|
class UStateTreeState;
|
|
class FUICommandList;
|
|
|
|
class SStateTreeOutliner : public SCompoundWidget
|
|
{
|
|
public:
|
|
SLATE_BEGIN_ARGS(SStateTreeOutliner) {}
|
|
SLATE_END_ARGS()
|
|
|
|
SStateTreeOutliner();
|
|
virtual ~SStateTreeOutliner() override;
|
|
|
|
void Construct(const FArguments& InArgs, TSharedRef<FStateTreeViewModel> StateTreeViewModel, const TSharedRef<FUICommandList>& InCommandList);
|
|
|
|
private:
|
|
// ViewModel handlers
|
|
void HandleModelAssetChanged();
|
|
void HandleModelStatesRemoved(const TSet<UStateTreeState*>& AffectedParents);
|
|
void HandleModelStatesMoved(const TSet<UStateTreeState*>& AffectedParents, const TSet<UStateTreeState*>& MovedStates);
|
|
void HandleModelStateAdded(UStateTreeState* ParentState, UStateTreeState* NewState);
|
|
void HandleModelStatesChanged(const TSet<UStateTreeState*>& AffectedStates, const FPropertyChangedEvent& PropertyChangedEvent);
|
|
void HandleModelSelectionChanged(const TArray<TWeakObjectPtr<UStateTreeState>>& SelectedStates);
|
|
void HandleTreeViewSelectionChanged(TConstArrayView<FGuid> SelectedStateIDs);
|
|
void HandleVisualThemeChanged(const UStateTree& StateTree);
|
|
|
|
virtual FReply OnKeyDown(const FGeometry& MyGeometry, const FKeyEvent& InKeyEvent) override;
|
|
|
|
TSharedPtr<SWidget> HandleContextMenuOpening();
|
|
|
|
// Action handlers
|
|
// @todo: these are also defined in the SStateTreeView, figure out how to share code.
|
|
UStateTreeState* GetFirstSelectedState() const;
|
|
void HandleAddSiblingState();
|
|
void HandleAddChildState();
|
|
void HandleCutSelectedStates();
|
|
void HandleCopySelectedStates();
|
|
void HandlePasteStatesAsSiblings();
|
|
void HandlePasteStatesAsChildren();
|
|
void HandleDuplicateSelectedStates();
|
|
void HandleDeleteStates();
|
|
void HandleEnableSelectedStates();
|
|
void HandleDisableSelectedStates();
|
|
|
|
bool HasSelection() const;
|
|
bool CanPaste() const;
|
|
bool CanEnableStates() const;
|
|
bool CanDisableStates() const;
|
|
|
|
void BindCommands();
|
|
|
|
TSharedPtr<FStateTreeViewModel> StateTreeViewModel;
|
|
|
|
TSharedPtr<SCompactStateTreeView> CompactStateTreeView;
|
|
|
|
TSharedPtr<FUICommandList> CommandList;
|
|
|
|
bool bItemsDirty = false;
|
|
bool bUpdatingSelection = false;
|
|
};
|