Network total reforge. Team-List and Race-Data handled
This commit is contained in:
@ -0,0 +1,15 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "DTFluxGeneralSettings.h"
|
||||
|
||||
#include "DTFluxProjectSettingsModule.h"
|
||||
|
||||
UDTFluxGeneralSettings::UDTFluxGeneralSettings()
|
||||
{
|
||||
CategoryName = "DTFlux API";
|
||||
|
||||
UE_LOG(logDTFluxProjectSettings, Log, TEXT("ModelAssetLoded isNull() -> %s"), ModelAsset.IsNull() ? TEXT("TRUE") : TEXT("FALSE"));
|
||||
|
||||
UE_LOG(logDTFluxProjectSettings, Log, TEXT("ModelAssetLoded IsValid() -> %s"), ModelAsset.IsValid() ? TEXT("TRUE") : TEXT("FALSE"));
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "DTFluxNetworkSettings.h"
|
||||
#include "Types/DTFluxNetworkSettingsTypes.h"
|
||||
|
||||
UDTFluxNetworkSettings::UDTFluxNetworkSettings()
|
||||
{
|
||||
CategoryName = "DTFlux API";
|
||||
}
|
||||
|
||||
#if WITH_EDITOR
|
||||
void UDTFluxNetworkSettings::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
|
||||
{
|
||||
Super::PostEditChangeProperty(PropertyChangedEvent);
|
||||
FString PropertyId = PropertyChangedEvent.GetPropertyName().ToString();
|
||||
if(PropertyId.Contains("WebSocket"))
|
||||
{
|
||||
FDTFluxWsSettings WsSettings;
|
||||
GetWebSocketSettings(this, WsSettings);
|
||||
OnDTFluxWebSocketSettingsChanged.Broadcast(WsSettings);
|
||||
}
|
||||
if(PropertyId.Contains("HTTP"))
|
||||
{
|
||||
FDTFluxHttpSettings HTTPSettings;
|
||||
GetHTTPSettings(this, HTTPSettings);
|
||||
OnDTFluxHttpSettingsChanged.Broadcast(HTTPSettings);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void UDTFluxNetworkSettings::GetHTTPSettings(const UDTFluxNetworkSettings* Settings,
|
||||
FDTFluxHttpSettings& OutHTTPSettings)
|
||||
{
|
||||
OutHTTPSettings.Address = Settings->HTTPAddress;
|
||||
OutHTTPSettings.Port = Settings->HTTPPort;
|
||||
OutHTTPSettings.Path = Settings->HTTPPath;
|
||||
}
|
||||
|
||||
void UDTFluxNetworkSettings::GetWebSocketSettings(const UDTFluxNetworkSettings* Settings,
|
||||
FDTFluxWsSettings& OutWsSettings)
|
||||
{
|
||||
OutWsSettings.Address = Settings->WebSocketAddress;
|
||||
OutWsSettings.Path = Settings->WebSocketPath;
|
||||
OutWsSettings.Port = Settings->WebSocketPort;
|
||||
OutWsSettings.bShouldAutoReconnectOnClosed = Settings->bWebSocketShouldReconnectOnClosed;
|
||||
OutWsSettings.bShouldConnectAtStartup = Settings->bWebSocketShouldConnectAtStartup;
|
||||
OutWsSettings.bShouldAutoReconnectOnError = Settings->bWebSocketShouldReconnectOnError;
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
#include "DTFluxProjectSettingsModule.h"
|
||||
|
||||
#define LOCTEXT_NAMESPACE "FDTFluxProjectSettingsModule"
|
||||
|
||||
DTFLUXPROJECTSETTINGS_API DEFINE_LOG_CATEGORY(logDTFluxProjectSettings)
|
||||
|
||||
void FDTFluxProjectSettingsModule::StartupModule()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void FDTFluxProjectSettingsModule::ShutdownModule()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#undef LOCTEXT_NAMESPACE
|
||||
|
||||
IMPLEMENT_MODULE(FDTFluxProjectSettingsModule, DTFluxProjectSettings)
|
||||
Reference in New Issue
Block a user