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

@@ -7,6 +7,9 @@
#include "UI/HTTP/HTTPRequestManager.h"
#include "APITestManager.generated.h"
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnListFleetsResponseReceived, const FDSListFleetsResponse&, ListFleetsResponse, bool, bWasSuccessful);
/**
*
*/
@@ -18,7 +21,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 UListFleetsBox;
class UAPITestManager;
struct FDSListFleetsResponse;
/**
*
*/
@@ -33,4 +34,10 @@ private:
UPROPERTY()
TObjectPtr<UAPITestManager> APITestManager;
UFUNCTION()
void ListFleetsButtonClicked();
UFUNCTION()
void OnListFleetsResponseReceived(const FDSListFleetsResponse& ListFleetsResponse, bool bWasSuccessful);
};