Widget slot properties are now shown
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
#include "Engine/Blueprint.h"
|
||||
#include "Engine/SCS_Node.h"
|
||||
#include "MaterialGraph/MaterialGraphNode.h"
|
||||
#include "Components/Widget.h"
|
||||
#include "Components/PanelSlot.h"
|
||||
#include "EdGraph/EdGraphPin.h"
|
||||
#include "UObject/EnumProperty.h"
|
||||
|
||||
@@ -194,6 +196,17 @@ TArray<FWingProperty> FWingProperty::GetAll(UObject* Obj, EPropertyFlags Flags)
|
||||
}
|
||||
}
|
||||
|
||||
// If it's a Widget, hide the slot property, and add the
|
||||
// slot properties.
|
||||
if (UWidget* Widget = Cast<UWidget>(Obj))
|
||||
{
|
||||
FWingProperty::Remove(Result, TEXT("Slot"));
|
||||
if (UPanelSlot* Slot = Widget->Slot)
|
||||
{
|
||||
Collect(Slot->GetClass(), Slot, Result, Flags);
|
||||
}
|
||||
}
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
||||
@@ -119,7 +119,9 @@ void UWingTypes::ChooseShortName(const FAssetData &Data)
|
||||
|
||||
FString UWingTypes::TypeToTextInner(FName Category, FName SubCategory, UObject* SubCategoryObject)
|
||||
{
|
||||
if ((Category == UEdGraphSchema_K2::PC_Boolean) ||
|
||||
if ((Category == UEdGraphSchema_K2::PC_Delegate) ||
|
||||
(Category == UEdGraphSchema_K2::PC_MCDelegate) ||
|
||||
(Category == UEdGraphSchema_K2::PC_Boolean) ||
|
||||
(Category == UEdGraphSchema_K2::PC_Int) ||
|
||||
(Category == UEdGraphSchema_K2::PC_Int64) ||
|
||||
(Category == UEdGraphSchema_K2::PC_Name) ||
|
||||
@@ -241,6 +243,8 @@ void UWingTypes::Initialize(FSubsystemCollectionBase& Collection)
|
||||
Packages.Sort([](const UPackage& A, const UPackage& B) { return A.GetName() < B.GetName(); });
|
||||
|
||||
// Reserve the short names of the primitives.
|
||||
ReserveShortName(UEdGraphSchema_K2::PC_Delegate);
|
||||
ReserveShortName(UEdGraphSchema_K2::PC_MCDelegate);
|
||||
ReserveShortName(UEdGraphSchema_K2::PC_Boolean);
|
||||
ReserveShortName(UEdGraphSchema_K2::PC_Int);
|
||||
ReserveShortName(UEdGraphSchema_K2::PC_Int64);
|
||||
|
||||
Reference in New Issue
Block a user