Lesson 58 - HTTP Request Manager
This commit is contained in:
10
.idea/.idea.FPSTemplate.dir/.idea/workspace.xml
generated
10
.idea/.idea.FPSTemplate.dir/.idea/workspace.xml
generated
@@ -118,6 +118,10 @@
|
|||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="91dd7ef3-692f-484d-9bd1-060b29650efd" name="Changes" comment="">
|
<list default="true" id="91dd7ef3-692f-484d-9bd1-060b29650efd" name="Changes" comment="">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/.idea.FPSTemplate.dir/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.FPSTemplate.dir/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/.idea.FPSTemplate.dir/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.FPSTemplate.dir/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Content/DedicatedServers/APITest/UI/WBP_APITestOverlay.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/DedicatedServers/APITest/UI/WBP_APITestOverlay.uasset" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Source/DedicatedServers/Private/UI/APITest/APITestOverlay.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Source/DedicatedServers/Private/UI/APITest/APITestOverlay.cpp" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Source/DedicatedServers/Public/UI/API/ListFleets/ListFleetsBox.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/DedicatedServers/Public/UI/API/ListFleets/ListFleetsBox.h" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Source/DedicatedServers/Public/UI/APITest/APITestOverlay.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/DedicatedServers/Public/UI/APITest/APITestOverlay.h" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@@ -141,10 +145,14 @@
|
|||||||
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Private/UI/API/ListFleets/FleetId.cpp" root0="FORCE_HIGHLIGHTING" />
|
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Private/UI/API/ListFleets/FleetId.cpp" root0="FORCE_HIGHLIGHTING" />
|
||||||
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Private/UI/API/ListFleets/ListFleetsBox.cpp" root0="FORCE_HIGHLIGHTING" />
|
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Private/UI/API/ListFleets/ListFleetsBox.cpp" root0="FORCE_HIGHLIGHTING" />
|
||||||
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Private/UI/APITest/APITestHUD.cpp" root0="FORCE_HIGHLIGHTING" />
|
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Private/UI/APITest/APITestHUD.cpp" root0="FORCE_HIGHLIGHTING" />
|
||||||
|
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Private/UI/APITest/APITestManager.cpp" root0="FORCE_HIGHLIGHTING" />
|
||||||
|
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Private/UI/HTTP/HTTPRequestManager.cpp" root0="FORCE_HIGHLIGHTING" />
|
||||||
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Public/Game/DS_GameMode.h" root0="FORCE_HIGHLIGHTING" />
|
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Public/Game/DS_GameMode.h" root0="FORCE_HIGHLIGHTING" />
|
||||||
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Public/UI/API/ListFleets/FleetId.h" root0="FORCE_HIGHLIGHTING" />
|
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Public/UI/API/ListFleets/FleetId.h" root0="FORCE_HIGHLIGHTING" />
|
||||||
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Public/UI/API/ListFleets/ListFleetsBox.h" root0="FORCE_HIGHLIGHTING" />
|
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Public/UI/API/ListFleets/ListFleetsBox.h" root0="FORCE_HIGHLIGHTING" />
|
||||||
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Public/UI/APITest/APITestHUD.h" root0="FORCE_HIGHLIGHTING" />
|
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Public/UI/APITest/APITestHUD.h" root0="FORCE_HIGHLIGHTING" />
|
||||||
|
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Public/UI/APITest/APITestManager.h" root0="FORCE_HIGHLIGHTING" />
|
||||||
|
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Public/UI/HTTP/HTTPRequestManager.h" root0="FORCE_HIGHLIGHTING" />
|
||||||
<setting file="file://$PROJECT_DIR$/Source/FPSTemplate/FPSTemplate.Build.cs" root0="FORCE_HIGHLIGHTING" />
|
<setting file="file://$PROJECT_DIR$/Source/FPSTemplate/FPSTemplate.Build.cs" root0="FORCE_HIGHLIGHTING" />
|
||||||
</component>
|
</component>
|
||||||
<component name="McpProjectServerCommands">
|
<component name="McpProjectServerCommands">
|
||||||
@@ -64914,7 +64922,7 @@
|
|||||||
<workItem from="1773536227018" duration="61902000" />
|
<workItem from="1773536227018" duration="61902000" />
|
||||||
<workItem from="1774233517830" duration="18186000" />
|
<workItem from="1774233517830" duration="18186000" />
|
||||||
<workItem from="1774317832300" duration="32871000" />
|
<workItem from="1774317832300" duration="32871000" />
|
||||||
<workItem from="1774531822750" duration="13142000" />
|
<workItem from="1774531822750" duration="17428000" />
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00001" summary="Added in EC2 support and adjusted Anywhere if statement to allow EC2 and to clean uip variable placement.">
|
<task id="LOCAL-00001" summary="Added in EC2 support and adjusted Anywhere if statement to allow EC2 and to clean uip variable placement.">
|
||||||
<option name="closed" value="true" />
|
<option name="closed" value="true" />
|
||||||
|
|||||||
BIN
Content/DedicatedServers/APITest/BP_APITestManager.uasset
Normal file
BIN
Content/DedicatedServers/APITest/BP_APITestManager.uasset
Normal file
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,9 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
|
#include "UI/APITest/APITestManager.h"
|
||||||
|
|
||||||
|
void UAPITestManager::ListFleetsButtonClicked()
|
||||||
|
{
|
||||||
|
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "List Fleets Button Clicked");
|
||||||
|
}
|
||||||
@@ -2,3 +2,20 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "UI/APITest/APITestOverlay.h"
|
#include "UI/APITest/APITestOverlay.h"
|
||||||
|
|
||||||
|
#include "Components/Button.h"
|
||||||
|
#include "UI/API/ListFleets/ListFleetsBox.h"
|
||||||
|
#include "UI/APITest/APITestManager.h"
|
||||||
|
|
||||||
|
void UAPITestOverlay::NativeConstruct()
|
||||||
|
{
|
||||||
|
Super::NativeConstruct();
|
||||||
|
|
||||||
|
check(APITestManagerClass);
|
||||||
|
APITestManager = NewObject<UAPITestManager>(this, APITestManagerClass);
|
||||||
|
|
||||||
|
check(ListFleetsBox)
|
||||||
|
check(ListFleetsBox->Button_ListFleets)
|
||||||
|
ListFleetsBox->Button_ListFleets->OnClicked.AddDynamic(APITestManager, &UAPITestManager::ListFleetsButtonClicked);
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
|
#include "UI/HTTP/HTTPRequestManager.h"
|
||||||
@@ -24,5 +24,4 @@ public:
|
|||||||
UPROPERTY(meta = (BindWidget))
|
UPROPERTY(meta = (BindWidget))
|
||||||
TObjectPtr<UButton> Button_ListFleets;
|
TObjectPtr<UButton> Button_ListFleets;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
21
Source/DedicatedServers/Public/UI/APITest/APITestManager.h
Normal file
21
Source/DedicatedServers/Public/UI/APITest/APITestManager.h
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "UI/HTTP/HTTPRequestManager.h"
|
||||||
|
#include "APITestManager.generated.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
UCLASS()
|
||||||
|
class DEDICATEDSERVERS_API UAPITestManager : public UHTTPRequestManager
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
UFUNCTION()
|
||||||
|
void ListFleetsButtonClicked();
|
||||||
|
};
|
||||||
@@ -6,6 +6,8 @@
|
|||||||
#include "Blueprint/UserWidget.h"
|
#include "Blueprint/UserWidget.h"
|
||||||
#include "APITestOverlay.generated.h"
|
#include "APITestOverlay.generated.h"
|
||||||
|
|
||||||
|
class UListFleetsBox;
|
||||||
|
class UAPITestManager;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -13,4 +15,22 @@ UCLASS()
|
|||||||
class DEDICATEDSERVERS_API UAPITestOverlay : public UUserWidget
|
class DEDICATEDSERVERS_API UAPITestOverlay : public UUserWidget
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
UPROPERTY(EditDefaultsOnly)
|
||||||
|
TSubclassOf<UAPITestManager> APITestManagerClass;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
virtual void NativeConstruct() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
UPROPERTY(meta = (BindWidget))
|
||||||
|
TObjectPtr<UListFleetsBox> ListFleetsBox = nullptr;
|
||||||
|
|
||||||
|
UPROPERTY()
|
||||||
|
TObjectPtr<UAPITestManager> APITestManager;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
16
Source/DedicatedServers/Public/UI/HTTP/HTTPRequestManager.h
Normal file
16
Source/DedicatedServers/Public/UI/HTTP/HTTPRequestManager.h
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "UObject/Object.h"
|
||||||
|
#include "HTTPRequestManager.generated.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
UCLASS(Blueprintable)
|
||||||
|
class DEDICATEDSERVERS_API UHTTPRequestManager : public UObject
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user