You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Slate TPanelChildren, TSlotlessChildren are no longer full-fledged arrays; removed any unused Array API. Fixed up a lot of improper use cases. This better encapsulates the action of adding/removing Slate Widgets from the runtime tree as a Slate Core concern. Alows us to add parent pointers in the future with significantly less effort. #codereview Wes.Hunt #codereview Nick.Darnell #codereview Matt.Kuhlendschmidt #codereview Justin.Sargent [CL 2234301 by Nick Atamas in Main branch]
45 lines
725 B
C++
45 lines
725 B
C++
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "SlateCorePrivatePCH.h"
|
|
|
|
FSlotBase::FSlotBase()
|
|
: Widget( SNullWidget::NullWidget )
|
|
{
|
|
|
|
}
|
|
|
|
FSlotBase::FSlotBase( const TSharedRef<SWidget>& InWidget )
|
|
: Widget( InWidget )
|
|
{
|
|
|
|
}
|
|
|
|
void FSlotBase::AttachWidget( const TSharedRef<SWidget>& InWidget )
|
|
{
|
|
Widget = InWidget;
|
|
}
|
|
|
|
|
|
const TSharedRef<SWidget>& FSlotBase::GetWidget() const
|
|
{
|
|
return Widget;
|
|
}
|
|
|
|
const TSharedPtr<SWidget> FSlotBase::DetachWidget()
|
|
{
|
|
if (Widget != SNullWidget::NullWidget)
|
|
{
|
|
const TSharedRef<SWidget> MyExWidget = Widget;
|
|
Widget = SNullWidget::NullWidget;
|
|
return MyExWidget;
|
|
}
|
|
else
|
|
{
|
|
// Nothing to detach!
|
|
return TSharedPtr<SWidget>();
|
|
}
|
|
}
|
|
|
|
FSlotBase::~FSlotBase()
|
|
{
|
|
} |