Added FirstName/LastName Separator for displaying formatted name.
This commit is contained in:
@ -15,7 +15,8 @@ void FDTFluxParticipant::AddTeammate(const FString LastName, const FString First
|
||||
{
|
||||
}
|
||||
|
||||
FString FDTFluxParticipant::GetFormattedName(const int MaxChar, const FString OverflowChars) const
|
||||
FString FDTFluxParticipant::GetFormattedName(const int MaxChar, const FString Separator,
|
||||
const FString OverflowChars) const
|
||||
{
|
||||
{
|
||||
if (MaxChar <= 0)
|
||||
@ -37,13 +38,13 @@ FString FDTFluxParticipant::GetFormattedName(const int MaxChar, const FString Ov
|
||||
FString Initial;
|
||||
if (!FirstName.IsEmpty())
|
||||
{
|
||||
Initial = FirstName.Left(1).ToUpper() + " ";
|
||||
Initial = FirstName.Left(1).ToUpper() + Separator;
|
||||
}
|
||||
|
||||
FString FormattedLastName = LastName.ToUpper();
|
||||
|
||||
FString FullName = Initial + FormattedLastName;
|
||||
UE_LOG(logDTFluxCore, Error, TEXT("FullName for Bib %i is %s"), Bib, *FullName);
|
||||
UE_LOG(logDTFluxCore, VeryVerbose, TEXT("FullName for Bib %i is %s"), Bib, *FullName);
|
||||
|
||||
if (FullName.Len() <= MaxChar)
|
||||
{
|
||||
@ -80,10 +81,11 @@ FString FDTFluxParticipant::GetFormattedName(const int MaxChar, const FString Ov
|
||||
}
|
||||
}
|
||||
|
||||
FString FDTFluxParticipant::GetConcatFormattedName(const int MaxChar, const FString OverflowChar) const
|
||||
FString FDTFluxParticipant::GetConcatFormattedName(const int MaxChar, const FString Separator,
|
||||
const FString OverflowChar, const FString BibSeparator) const
|
||||
{
|
||||
FString BibText = FString::FromInt(Bib) + " ";
|
||||
FString FormattedName = GetFormattedName(MaxChar - BibText.Len(), OverflowChar);
|
||||
FString BibText = FString::FromInt(Bib) + BibSeparator;
|
||||
FString FormattedName = GetFormattedName(MaxChar - BibText.Len(), Separator, OverflowChar);
|
||||
return BibText + FormattedName;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user