ExoWest/Source/Exo/Private/Widget/UWBP_Buf.cpp

25 lines
524 B
C++
Raw Normal View History

2025-05-22 17:21:59 +02:00
// Fill out your copyright notice in the Description page of Project Settings.
#include "Widget/UWBP_Buf.h"
2025-05-22 17:21:59 +02:00
#include "Components/Image.h"
#include "Widget/UWBP_RoundProgressBar.h"
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);
}
void UUWBP_Buf::SetPrecent(float precent)
2025-05-22 17:21:59 +02:00
{
if (ProgressBar)
ProgressBar->SetPercent(precent);
}