2024-04-21 06:51:51 -07:00
|
|
|
|
#include "GasaHUD.h"
|
2024-04-21 15:56:57 -07:00
|
|
|
|
#include "GasaHUD_Inlines.h"
|
2024-04-21 06:51:51 -07:00
|
|
|
|
|
|
|
|
|
#include "GasaDevOptions.h"
|
2024-04-21 15:56:57 -07:00
|
|
|
|
#include "HUDHostWidget.h"
|
2024-04-21 06:51:51 -07:00
|
|
|
|
#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()
|
|
|
|
|
, 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-21 06:51:51 -07:00
|
|
|
|
|
|
|
|
|
#pragma region HUD
|
|
|
|
|
void AGasaHUD::ShowHUD()
|
|
|
|
|
{
|
|
|
|
|
Super::ShowHUD();
|
|
|
|
|
}
|
|
|
|
|
#pragma endregion HUD
|
|
|
|
|
|
|
|
|
|
#pragma region Actor
|
|
|
|
|
void AGasaHUD::BeginPlay()
|
|
|
|
|
{
|
|
|
|
|
Super::BeginPlay();
|
|
|
|
|
}
|
|
|
|
|
#pragma endregion Actor
|