GASATHON/Project/Source/Gasa/UI/GasaHUD.cpp

46 lines
1.0 KiB
C++
Raw Normal View History

#include "GasaHUD.h"
2024-04-21 15:56:57 -07:00
#include "GasaHUD_Inlines.h"
#include "GasaDevOptions.h"
2024-04-21 15:56:57 -07:00
#include "HUDHostWidget.h"
#include "Blueprint/UserWidget.h"
using namespace Gasa;
2024-04-21 21:30:29 -07:00
void AGasaHUD::InitHostWidget(FWidgetControllerData const* WidgetControllerData)
2024-04-21 15:56:57 -07:00
{
HostWidget = CreateWidget<UHUDHostWidget>( GetWorld()
2024-04-21 15:56:57 -07:00
, GetDevOptions()->Template_HUD_HostUI.LoadSynchronous() );
HostWidgetController = NewObject<UHostWidgetController>(this, GetDevOptions()->Template_HostWidgetController.Get());
2024-04-21 21:30:29 -07:00
HostWidgetController->Data = (* WidgetControllerData);
2024-04-21 15:56:57 -07:00
HostWidget->SetWidgetController(HostWidgetController);
2024-04-21 22:54:33 -07:00
HostWidgetController->BindCallbacksToDependencies();
2024-04-21 21:30:29 -07:00
HostWidgetController->BroadcastInitialValues();
2024-04-21 15:56:57 -07:00
HostWidget->AddToViewport();
}
2024-04-26 15:23:13 -07:00
void AGasaHUD::DrawHUD()
{
Super::DrawHUD();
}
#pragma region HUD
void AGasaHUD::ShowHUD()
{
Super::ShowHUD();
}
#pragma endregion HUD
#pragma region Actor
void AGasaHUD::BeginPlay()
{
Super::BeginPlay();
}
2024-04-26 15:23:13 -07:00
void AGasaHUD::Tick(float DeltaSeconds)
{
Super::Tick(DeltaSeconds);
}
#pragma endregion Actor