Files
UnrealEngineUWP/Engine/Source/Editor/DetailCustomizations/Private/BlackboardEntryDetails.cpp
Matt Kuhlenschmidt 268567fe00 Fix non-unity
#rb none
#lockdown nick.penwarden

[CL 3229877 by Matt Kuhlenschmidt in Main branch]
2016-12-09 17:27:23 -05:00

44 lines
1.5 KiB
C++

// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#include "BlackboardEntryDetails.h"
#include "Widgets/SNullWidget.h"
#include "Engine/GameViewportClient.h"
#include "SlateOptMacros.h"
#include "IDetailChildrenBuilder.h"
#include "DetailWidgetRow.h"
#include "PropertyHandle.h"
#define LOCTEXT_NAMESPACE "BlackboardEntryDetails"
TSharedRef<IPropertyTypeCustomization> FBlackboardEntryDetails::MakeInstance()
{
return MakeShareable( new FBlackboardEntryDetails );
}
BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION
void FBlackboardEntryDetails::CustomizeHeader( TSharedRef<class IPropertyHandle> StructPropertyHandle, class FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils )
{
MyNameProperty = StructPropertyHandle->GetChildHandle(TEXT("EntryName"));
MyDescriptionProperty = StructPropertyHandle->GetChildHandle(TEXT("EntryDescription"));
MyValueProperty = StructPropertyHandle->GetChildHandle(TEXT("KeyType"));
// dont show a header row
HeaderRow.WholeRowContent()
[
SNullWidget::NullWidget
];
}
END_SLATE_FUNCTION_BUILD_OPTIMIZATION
void FBlackboardEntryDetails::CustomizeChildren( TSharedRef<class IPropertyHandle> StructPropertyHandle, class IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils )
{
if (StructPropertyHandle->IsValidHandle())
{
StructBuilder.AddChildProperty(MyNameProperty.ToSharedRef());
StructBuilder.AddChildProperty(MyDescriptionProperty.ToSharedRef());
StructBuilder.AddChildProperty(MyValueProperty.ToSharedRef());
}
}
#undef LOCTEXT_NAMESPACE