Lesson 65 - ListFleets Callback

This commit is contained in:
Norman Lansing
2026-03-30 17:30:24 -04:00
parent 734f859059
commit 41d61d883a
6 changed files with 90 additions and 33 deletions

View File

@@ -16,6 +16,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 FDSListFleetsResponse& ListFleetsResponse, bool bWasSuccessful)
{
if (bWasSuccessful)
{
}
else
{
}
ListFleetsBox->Button_ListFleets->SetIsEnabled(true);
}