Lesson 65 - ListFleets Callback

This commit is contained in:
Norman Lansing
2026-03-16 22:30:26 -04:00
parent 6f3e1d1f86
commit e95360489b
6 changed files with 86 additions and 32 deletions

View File

@@ -17,5 +17,27 @@ void UAPITestOverlay::NativeConstruct()
check (ListFleetsBox)
check (ListFleetsBox->Button_ListFleets)
ListFleetsBox->Button_ListFleets->OnClicked.AddDynamic(APITestManager, &UAPITestManager::ListFleetsButtonClicked);
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);
}