Adding GetFormatedName() with Bib param

This commit is contained in:
2025-07-08 18:24:26 +02:00
parent 760a764816
commit 9bb5e760f2
2 changed files with 15 additions and 2 deletions

View File

@ -3,7 +3,17 @@
#include "FTDFluxUtils.h" #include "FTDFluxUtils.h"
FText UFTDFluxUtils::GetFormatedName(FDTFluxParticipant& Participant, const int MaxChar, const FString OverFlowChar) #include "DTFluxCoreSubsystem.h"
FText UFTDFluxUtils::GetFormatedName(const int& Bib, const int MaxChar, const FString OverFlowChar)
{
UDTFluxCoreSubsystem* CoreSubsystem = GEngine->GetEngineSubsystem<UDTFluxCoreSubsystem>();
const FDTFluxParticipant OutParticipant = CoreSubsystem->GetParticipant(Bib);
return OutParticipant.GetFormattedNameText(MaxChar, OverFlowChar);
}
FText UFTDFluxUtils::GetParticipantFormatedName(FDTFluxParticipant& Participant, const int MaxChar,
const FString OverFlowChar)
{ {
return Participant.GetFormattedNameText(MaxChar, OverFlowChar); return Participant.GetFormattedNameText(MaxChar, OverFlowChar);
} }

View File

@ -17,6 +17,9 @@ class DTFLUXUTILITIES_API UFTDFluxUtils : public UBlueprintFunctionLibrary
public: public:
UFUNCTION(BlueprintCallable, Category="DTFlux|Utils", Meta=(Keywords="name, concat, participant")) UFUNCTION(BlueprintCallable, Category="DTFlux|Utils", Meta=(Keywords="name, concat, participant"))
static FText GetFormatedName(FDTFluxParticipant& Participant, const int MaxChar = 10, static FText GetFormatedName(const int& Bib, const int MaxChar = 10,
const FString OverFlowChar = "...");
UFUNCTION(BlueprintCallable, Category="DTFlux|Utils", Meta=(Keywords="name, concat, participant"))
static FText GetParticipantFormatedName(FDTFluxParticipant& Participant, const int MaxChar = 10,
const FString OverFlowChar = "..."); const FString OverFlowChar = "...");
}; };