第一次提交
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
//
|
||||
|
||||
|
||||
#include "UI/ItemStacks/ItemDataDraggingWidget.h"
|
||||
|
||||
#include "CommonTextBlock.h"
|
||||
#include "Components/Image.h"
|
||||
#include "Components/SizeBox.h"
|
||||
|
||||
void UItemDataDraggingWidget::NativePreConstruct()
|
||||
{
|
||||
Super::NativePreConstruct();
|
||||
if (MainSizeBox)
|
||||
{
|
||||
MainSizeBox->SetHeightOverride(Height);
|
||||
MainSizeBox->SetWidthOverride(Width);
|
||||
}
|
||||
SetAmount(ItemAmount);
|
||||
SetIcon(IconTexture);
|
||||
}
|
||||
|
||||
void UItemDataDraggingWidget::SetAmount(const int32 InAmount)
|
||||
{
|
||||
ItemAmount = InAmount;
|
||||
if (AmountText)
|
||||
{
|
||||
AmountText->SetText(FText::AsNumber(ItemAmount));
|
||||
}
|
||||
}
|
||||
|
||||
void UItemDataDraggingWidget::SetIcon(UTexture2D* InIconTexture)
|
||||
{
|
||||
IconTexture = InIconTexture;
|
||||
if (IconImage)
|
||||
{
|
||||
IconImage->SetBrushFromTexture(IconTexture);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user