2022-05-23 18:41:30 +00:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
#include "LyraTabButtonBase.h"
|
2022-09-13 07:18:28 +00:00
|
|
|
|
2022-05-23 18:41:30 +00:00
|
|
|
#include "CommonLazyImage.h"
|
2022-09-13 07:18:28 +00:00
|
|
|
#include "UI/Common/LyraTabListWidgetBase.h"
|
|
|
|
|
|
|
|
class UObject;
|
|
|
|
struct FSlateBrush;
|
2022-05-23 18:41:30 +00:00
|
|
|
|
|
|
|
void ULyraTabButtonBase::SetIconFromLazyObject(TSoftObjectPtr<UObject> LazyObject)
|
|
|
|
{
|
|
|
|
if (LazyImage_Icon)
|
|
|
|
{
|
|
|
|
LazyImage_Icon->SetBrushFromLazyDisplayAsset(LazyObject);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void ULyraTabButtonBase::SetIconBrush(const FSlateBrush& Brush)
|
|
|
|
{
|
|
|
|
if (LazyImage_Icon)
|
|
|
|
{
|
|
|
|
LazyImage_Icon->SetBrush(Brush);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void ULyraTabButtonBase::SetTabLabelInfo_Implementation(const FLyraTabDescriptor& TabLabelInfo)
|
|
|
|
{
|
|
|
|
SetButtonText(TabLabelInfo.TabText);
|
|
|
|
SetIconBrush(TabLabelInfo.IconBrush);
|
|
|
|
}
|