RealtimeStyleTransferRuntime/Plugins/GameSettings/Source/Private/GameSettingValueDiscrete.cpp

33 lines
775 B
C++
Raw Normal View History

2022-05-23 18:41:30 +00:00
// Copyright Epic Games, Inc. All Rights Reserved.
#include "GameSettingValueDiscrete.h"
#define LOCTEXT_NAMESPACE "GameSetting"
//--------------------------------------
// UGameSettingValueDiscrete
//--------------------------------------
UGameSettingValueDiscrete::UGameSettingValueDiscrete()
{
}
FString UGameSettingValueDiscrete::GetAnalyticsValue() const
{
const TArray<FText> Options = GetDiscreteOptions();
const int32 CurrentOptionIndex = GetDiscreteOptionIndex();
if (Options.IsValidIndex(CurrentOptionIndex))
{
const FString* SourceString = FTextInspector::GetSourceString(Options[CurrentOptionIndex]);
if (SourceString)
{
return *SourceString;
}
}
return TEXT("<Unknown Index>");
}
#undef LOCTEXT_NAMESPACE