Files
UnrealEngineUWP/Engine/Source/Editor/PropertyEditor/Private/DetailTreeNode.cpp
Ryan Vance 7c51ff94af Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR)
CL 1 of 8
#rb integration

[CL 4748712 by Ryan Vance in Dev-VR branch]
2019-01-17 18:54:05 -05:00

44 lines
1.3 KiB
C++

// Copyright 1998-2019 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);
}