Files
UnrealEngineUWP/Engine/Source/Editor/PropertyEditor/Private/DetailTreeNode.cpp
ryan durand 627baf970a Updating copyright for Engine Editor.
#rnx
#rb none


#ROBOMERGE-SOURCE: CL 10869241 via CL 10869527 via CL 10869904
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870586 by ryan durand in Main branch]
2019-12-26 15:33:43 -05:00

44 lines
1.2 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "DetailTreeNode.h"
#include "DetailWidgetRow.h"
FNodeWidgets FDetailTreeNode::CreateNodeWidgets() const
{
FDetailWidgetRow Row;
GenerateStandaloneWidget(Row);
FNodeWidgets Widgets;
if(Row.HasAnyContent())
{
if (Row.HasColumns())
{
Widgets.NameWidget = Row.NameWidget.Widget;
Widgets.NameWidgetLayoutData = FNodeWidgetLayoutData(
Row.NameWidget.HorizontalAlignment, Row.NameWidget.VerticalAlignment, Row.NameWidget.MinWidth, Row.NameWidget.MaxWidth);
Widgets.ValueWidget = Row.ValueWidget.Widget;
Widgets.ValueWidgetLayoutData = FNodeWidgetLayoutData(
Row.ValueWidget.HorizontalAlignment, Row.ValueWidget.VerticalAlignment, Row.ValueWidget.MinWidth, Row.ValueWidget.MaxWidth);
}
else
{
Widgets.WholeRowWidget = Row.WholeRowWidget.Widget;
Widgets.WholeRowWidgetLayoutData = FNodeWidgetLayoutData(
Row.WholeRowWidget.HorizontalAlignment, Row.WholeRowWidget.VerticalAlignment, Row.WholeRowWidget.MinWidth, Row.WholeRowWidget.MaxWidth);
}
}
return Widgets;
}
void FDetailTreeNode::GetChildren(TArray<TSharedRef<IDetailTreeNode>>& OutChildren)
{
FDetailNodeList Children;
GetChildren(Children);
OutChildren.Reset(Children.Num());
OutChildren.Append(Children);
}