2025-05-22 17:21:59 +02:00
|
|
|
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
|
|
|
|
|
2025-06-04 00:28:56 +02:00
|
|
|
#include "Widget/UWBP_Buf.h"
|
2025-05-22 17:21:59 +02:00
|
|
|
#include "Components/Image.h"
|
|
|
|
|
#include "Widget/UWBP_RoundProgressBar.h"
|
|
|
|
|
|
2025-06-04 00:28:56 +02:00
|
|
|
void UUWBP_Buf::SetTexture(UTexture2D* texture)
|
2025-05-22 17:21:59 +02:00
|
|
|
{
|
|
|
|
|
if (!DebufImage)
|
|
|
|
|
return;
|
|
|
|
|
FSlateBrush NewBrush;
|
|
|
|
|
if (!texture)
|
|
|
|
|
return;
|
|
|
|
|
NewBrush.SetResourceObject(texture);
|
|
|
|
|
NewBrush.ImageSize = FVector2D(64, 64);
|
|
|
|
|
DebufImage->SetBrush(NewBrush);
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-04 00:28:56 +02:00
|
|
|
void UUWBP_Buf::SetPrecent(float precent)
|
2025-05-22 17:21:59 +02:00
|
|
|
{
|
|
|
|
|
if (ProgressBar)
|
|
|
|
|
ProgressBar->SetPercent(precent);
|
|
|
|
|
}
|