Compare commits

..

2 Commits

Author SHA1 Message Date
e02ed8538f Added Sort Ranking 2025-07-17 19:21:32 +02:00
9b85bfc94a Fixing Compile Error 2025-07-17 19:07:50 +02:00
5 changed files with 41 additions and 3 deletions

View File

@ -23,7 +23,7 @@ public class DTFluxProjectSettings : ModuleRules
"DeveloperSettings",
"DTFluxCore",
"Settings",
"DeveloperSettings"
"DeveloperSettings","AvalancheMedia"
}
);

View File

@ -2,6 +2,7 @@
#include "DTFluxGeneralSettings.h"
#include "Assets/DTFluxModelAsset.h"
#include "DTFluxProjectSettingsModule.h"
@ -14,3 +15,17 @@ UDTFluxGeneralSettings::UDTFluxGeneralSettings()
UE_LOG(logDTFluxProjectSettings, Log, TEXT("Category Name -> %s"), *GetCategoryName().ToString());
}
void UDTFluxGeneralSettings::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
{
Super::PostEditChangeProperty(PropertyChangedEvent);
if (PropertyChangedEvent.Property &&
PropertyChangedEvent.Property->GetFName() == GET_MEMBER_NAME_CHECKED(UDTFluxGeneralSettings, RemoteTargetRundown))
{
UE_LOG(LogTemp, Log, TEXT("RemoteTargetRundown property changed to: %s"),
RemoteTargetRundown.IsNull() ? TEXT("None") : *RemoteTargetRundown.ToString());
OnRemoteRundownChanged.Broadcast(RemoteTargetRundown);
}
}

View File

@ -7,6 +7,8 @@
#include "Engine/DeveloperSettings.h"
#include "DTFluxGeneralSettings.generated.h"
class UAvaRundown;
// class UDTFluxModelAsset;
/**
*
*/
@ -20,5 +22,14 @@ public:
UDTFluxGeneralSettings();
UPROPERTY(Category="General", Config, EditAnywhere, BlueprintReadOnly, DisplayName="Datastorage File")
TSoftObjectPtr<UDTFluxModelAsset> ModelAsset;
UPROPERTY(Category="General|Remote HTTP", Config, EditAnywhere, BlueprintReadOnly, DisplayName="Rundown Remote Target")
TSoftObjectPtr<UAvaRundown> RemoteTargetRundown;
#if WITH_EDITOR
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
DECLARE_MULTICAST_DELEGATE_OneParam(FOnRemoteRundownChanged, const TSoftObjectPtr<UAvaRundown>& );
FOnRemoteRundownChanged OnRemoteRundownChanged;
#endif
};

View File

@ -1,7 +1,7 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "FTDFluxUtils.h"
#include "DTFluxUtils.h"
#include "DTFluxCoreSubsystem.h"
#include "DTFluxUtilitiesModule.h"
@ -55,3 +55,11 @@ void UFTDFluxUtils::GetFullName(const int Bib, FText& OutFullName)
}
UE_LOG(logDTFluxUtilities, Error, TEXT("DTFluxCoreSubsystem not available"));
}
void UFTDFluxUtils::SortSplitRankingsByRank(TArray<FDTFluxSplitRanking>& Rankings)
{
Rankings.Sort([](const FDTFluxSplitRanking& A, const FDTFluxSplitRanking& B)
{
return A.Rank < B.Rank;
});
}

View File

@ -6,7 +6,7 @@
#include "DTFluxCore/Public/Types/Struct/DTFluxTeamListStruct.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "Types/Struct/DTFluxRankingStructs.h"
#include "FTDFluxUtils.generated.h"
#include "DTFluxUtils.generated.h"
/**
*
@ -70,4 +70,8 @@ public:
UFUNCTION(BlueprintCallable, Category="DTFlux|Utils")
static void GetFullName(const int Bib, FText& OutFullName);
UFUNCTION(BlueprintCallable, Category="DTFlux|Utils")
static void SortSplitRankingsByRank(TArray<FDTFluxSplitRanking>& Rankings);
};