2026-03-15 09:19:39 -04:00
|
|
|
|
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
|
|
|
|
|
|
#include "UI/API_Test/APITestOverlay.h"
|
2026-03-15 17:02:22 -04:00
|
|
|
|
#include "UI/API_Test/APITestManager.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "Components/Button.h"
|
|
|
|
|
|
#include "UI/API/ListFleets/ListFleetsBox.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UAPITestOverlay::NativeConstruct()
|
|
|
|
|
|
{
|
|
|
|
|
|
Super::NativeConstruct();
|
|
|
|
|
|
|
|
|
|
|
|
check(APITestManagerClass);
|
|
|
|
|
|
APITestManager = NewObject<UAPITestManager>(this, APITestManagerClass);
|
|
|
|
|
|
|
|
|
|
|
|
check (ListFleetsBox)
|
|
|
|
|
|
check (ListFleetsBox->Button_ListFleets)
|
2026-03-16 22:30:26 -04:00
|
|
|
|
ListFleetsBox->Button_ListFleets->OnClicked.AddDynamic(this, &UAPITestOverlay::ListFleetsButtonClicked);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void UAPITestOverlay::ListFleetsButtonClicked()
|
|
|
|
|
|
{
|
|
|
|
|
|
check(APITestManager);
|
|
|
|
|
|
APITestManager->OnListFleetsResponseReceived.AddDynamic(this, &UAPITestOverlay::OnListFleetsResponseReceived);
|
|
|
|
|
|
APITestManager->ListFleets();
|
|
|
|
|
|
|
|
|
|
|
|
ListFleetsBox->Button_ListFleets->SetIsEnabled(false);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void UAPITestOverlay::OnListFleetsResponseReceived(const FDS_ListFleetsResponse& ListFleetResponse, bool bWasSuccessful)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (bWasSuccessful)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
ListFleetsBox->Button_ListFleets->SetIsEnabled(true);
|
2026-03-15 17:02:22 -04:00
|
|
|
|
}
|