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

@@ -7,6 +7,8 @@
#include "UI/HTTP/HTTPRequestManager.h"
#include "APITestManager.generated.h"
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnListFleetsResponseReceived, const FDS_ListFleetsResponse&, ListFleetResponse, bool, bWasSuccessful);
/**
*
*/
@@ -18,7 +20,10 @@ class DEDICATEDSERVERS_API UAPITestManager : public UHTTPRequestManager
public:
UFUNCTION()
void ListFleetsButtonClicked();
void ListFleets();
UPROPERTY()
FOnListFleetsResponseReceived OnListFleetsResponseReceived;
void ListFleets_Response(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful);
};

View File

@@ -8,6 +8,7 @@
class UAPITestManager;
class UListFleetsBox;
class FDS_ListFleetsResponse;
/**
*
*/
@@ -32,6 +33,11 @@ private:
UPROPERTY()
TObjectPtr<UAPITestManager> APITestManager;
UFUNCTION()
void ListFleetsButtonClicked();
UFUNCTION()
void OnListFleetsResponseReceived(const FDS_ListFleetsResponse& ListFleetResponse, bool bWasSuccessful);