Lesson 65 - ListFleets Callback
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user