You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#preflight 6272a74d2f6d177be3c6fdda #rb Matt.Kuhlenschmidt #ROBOMERGE-OWNER: Lauren.Barnes #ROBOMERGE-AUTHOR: lauren.barnes #ROBOMERGE-SOURCE: CL 20057269 via CL 20070159 via CL 20072035 via CL 20072203 #ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690) #ROBOMERGE-CONFLICT from-shelf [CL 20105363 by Lauren Barnes in ue5-main branch]
70 lines
1.7 KiB
C++
70 lines
1.7 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "PoseWatchManagerDragDrop.h"
|
|
#include "IPoseWatchManagerTreeItem.h"
|
|
#include "PoseWatchManagerStandaloneTypes.h"
|
|
|
|
#define LOCTEXT_NAMESPACE "SPoseWatchManager"
|
|
|
|
|
|
FPoseWatchManagerDragDropOp::FPoseWatchManagerDragDropOp()
|
|
: OverrideText()
|
|
, OverrideIcon(nullptr)
|
|
{}
|
|
|
|
EVisibility FPoseWatchManagerDragDropOp::GetOverrideVisibility() const
|
|
{
|
|
return OverrideText.IsEmpty() && OverrideIcon == nullptr ? EVisibility::Collapsed : EVisibility::Visible;
|
|
}
|
|
|
|
EVisibility FPoseWatchManagerDragDropOp::GetDefaultVisibility() const
|
|
{
|
|
return OverrideText.IsEmpty() && OverrideIcon == nullptr ? EVisibility::Visible : EVisibility::Collapsed;
|
|
}
|
|
|
|
TSharedPtr<SWidget> FPoseWatchManagerDragDropOp::GetDefaultDecorator() const
|
|
{
|
|
TSharedRef<SVerticalBox> VerticalBox = SNew(SVerticalBox);
|
|
|
|
VerticalBox->AddSlot()
|
|
[
|
|
SNew(SBorder)
|
|
.BorderImage(FAppStyle::GetBrush("Graph.ConnectorFeedback.Border"))
|
|
.Visibility(this, &FPoseWatchManagerDragDropOp::GetOverrideVisibility)
|
|
.Content()
|
|
[
|
|
SNew(SHorizontalBox)
|
|
|
|
+ SHorizontalBox::Slot()
|
|
.AutoWidth()
|
|
.Padding(0.0f, 0.0f, 3.0f, 0.0f)
|
|
[
|
|
SNew(SImage)
|
|
.Image(this, &FPoseWatchManagerDragDropOp::GetOverrideIcon)
|
|
]
|
|
|
|
+ SHorizontalBox::Slot()
|
|
.AutoWidth()
|
|
.VAlign(VAlign_Center)
|
|
[
|
|
SNew(STextBlock)
|
|
.Text(this, &FPoseWatchManagerDragDropOp::GetOverrideText)
|
|
]
|
|
]
|
|
];
|
|
|
|
for (auto& SubOp : SubOps)
|
|
{
|
|
auto Content = SubOp->GetDefaultDecorator();
|
|
if (Content.IsValid())
|
|
{
|
|
Content->SetVisibility(TAttribute<EVisibility>(this, &FPoseWatchManagerDragDropOp::GetDefaultVisibility));
|
|
VerticalBox->AddSlot()[Content.ToSharedRef()];
|
|
}
|
|
}
|
|
|
|
return VerticalBox;
|
|
}
|
|
|
|
#undef LOCTEXT_NAMESPACE
|