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]
42 lines
934 B
C++
42 lines
934 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "StateTreeDragDrop.h"
|
|
|
|
#include "StateTreeState.h"
|
|
#include "StateTreeViewModel.h"
|
|
#include "Widgets/SBoxPanel.h"
|
|
#include "Widgets/Layout/SBorder.h"
|
|
#include "Widgets/Text/STextBlock.h"
|
|
|
|
TSharedPtr<SWidget> FStateTreeSelectedDragDrop::GetDefaultDecorator() const
|
|
{
|
|
// Display all dragged nodes, enable the ones that can be moved into the current target node.
|
|
const TSharedRef<SVerticalBox> Box = SNew(SVerticalBox);
|
|
|
|
if (ViewModel)
|
|
{
|
|
TArray<UStateTreeState*> SelectedStates;
|
|
ViewModel->GetSelectedStates(SelectedStates);
|
|
|
|
for (UStateTreeState* State : SelectedStates)
|
|
{
|
|
Box->AddSlot()
|
|
.Padding(FMargin(4, 2))
|
|
[
|
|
SNew(STextBlock)
|
|
.Text(FText::FromName(State->Name))
|
|
.IsEnabled_Lambda([this]()
|
|
{
|
|
return bCanDrop;
|
|
})
|
|
];
|
|
}
|
|
}
|
|
|
|
return SNew(SBorder)
|
|
.BorderImage(FAppStyle::GetBrush("Menu.Background"))
|
|
[
|
|
Box
|
|
];
|
|
}
|