ExoWest/Source/Exo/Private/Widget/UWBP_Debuf.cpp
2025-05-22 17:21:59 +02:00

26 lines
531 B
C++

// Fill out your copyright notice in the Description page of Project Settings.
#include "Widget/UWBP_Debuf.h"
#include "Components/Image.h"
#include "Widget/UWBP_RoundProgressBar.h"
void UUWBP_Debuf::SetTexture(UTexture2D* texture)
{
if (!DebufImage)
return;
FSlateBrush NewBrush;
if (!texture)
return;
NewBrush.SetResourceObject(texture);
NewBrush.ImageSize = FVector2D(64, 64);
DebufImage->SetBrush(NewBrush);
}
void UUWBP_Debuf::SetPrecent(float precent)
{
if (ProgressBar)
ProgressBar->SetPercent(precent);
}