// Project Lab - NHTV Igad

#include "UnrealProject.h"
#include "OverlayProgressBar.h"
#include "ScreenOverlay.h"

void UOverlayProgressBar::NativeConstruct()
{
	m_text = Cast<UTextBlock>(WidgetTree->FindWidget("Text"));
	if(!m_text)
	{
		GERROR("No \"Text\" element in overlay progress bar");
	}

	Super::NativeConstruct();
}

void UOverlayProgressBar::SetOverlayInfo(class UOverlayInfo* info)
{
	if(m_text)
	{
		m_text->SetText(FText::FromString(info->message));
	}
}
