class OnBnechmarkHideSettings extends Event
{
}

class BenchmarkLineData extends IScriptable
{
	var label : String;
	var value : String;
}

class BenchmarkLabelController extends inkLogicController
{
	private editable var m_labelWidget : inkTextRef;
	private editable var m_valueWidget : inkTextRef;

	public function SetLabel( const label : ref< String > )
	{
		inkTextRef.SetText( m_labelWidget, label );
	}

	public function SetValue( const value : ref< String > )
	{
		inkTextRef.SetText( m_valueWidget, value );
	}

}

enum EEntryColumn : Int8
{
	left = 0,
	right = 1,
}

class BenchmarkResultsGameController extends inkGameController
{
	private editable var m_exitButton : inkWidgetRef;
	private editable var m_settingButton : inkWidgetRef;
	private editable var m_leftEntriesListContainer : inkCompoundRef;
	private editable var m_rightEntriesListContainer : inkCompoundRef;
	private editable var m_lineEntryName : CName;
	default m_lineEntryName = 'data';
	private editable var m_highlightLineEntryName : CName;
	default m_highlightLineEntryName = 'highlight_data';
	private editable var m_sectionEntryName : CName;
	default m_sectionEntryName = 'category';
	private var m_benchmarkSummary : worldBenchmarkSummary;
	private var m_exitRequestToken : inkGameNotificationToken;
	private var m_settingsAcive : Bool;

	protected event OnInitialize()
	{
		inkCompoundRef.RemoveAllChildren( m_leftEntriesListContainer );
		inkCompoundRef.RemoveAllChildren( m_rightEntriesListContainer );
		inkWidgetRef.RegisterToCallback( m_exitButton, 'OnRelease', this, 'OnShowExitPrompt' );
		inkWidgetRef.RegisterToCallback( m_settingButton, 'OnRelease', this, 'OnBnechmarkShowSettings' );
		RegisterToGlobalInputCallback( 'OnPreOnRelease', this, 'OnGlobalRelease' );
		DisplayBenchmarkSummary();
	}

	protected event OnShowExitPrompt( e : inkPointerEvent )
	{
		if( e.IsAction( 'click' ) )
		{
			ShowExitPrompt();
		}
	}

	protected event OnCloseBenchmarkResults( data : inkGameNotificationData )
	{
		var menuEvent : inkMenuInstance_SpawnEvent;
		var resultData : GenericMessageNotificationCloseData;
		resultData = ( ( GenericMessageNotificationCloseData )( data ) );
		if( resultData.result == GenericMessageNotificationResult.Confirm )
		{
			menuEvent = new inkMenuInstance_SpawnEvent;
			menuEvent.Init( 'OnBenchmarkResultsClose' );
			QueueEvent( menuEvent );
		}
		m_exitRequestToken = NULL;
	}

	protected event OnBnechmarkShowSettings( e : inkPointerEvent )
	{
		var menuEvent : inkMenuInstance_SpawnEvent;
		if( e.IsAction( 'click' ) )
		{
			menuEvent = new inkMenuInstance_SpawnEvent;
			menuEvent.Init( 'OnBenchmarkSettings' );
			QueueEvent( menuEvent );
			inkCompoundRef.SetVisible( m_leftEntriesListContainer, false );
			inkCompoundRef.SetVisible( m_rightEntriesListContainer, false );
			inkWidgetRef.SetVisible( m_exitButton, false );
			inkWidgetRef.SetVisible( m_settingButton, false );
			m_settingsAcive = true;
		}
	}

	protected event OnOnBnechmarkHideSettings( evt : OnBnechmarkHideSettings )
	{
		inkCompoundRef.SetVisible( m_leftEntriesListContainer, true );
		inkCompoundRef.SetVisible( m_rightEntriesListContainer, true );
		inkWidgetRef.SetVisible( m_exitButton, true );
		inkWidgetRef.SetVisible( m_settingButton, true );
		m_settingsAcive = false;
	}

	protected event OnSetUserData( data : IScriptable )
	{
		var callbackConnector : inkCallbackConnectorData;
		callbackConnector = ( ( inkCallbackConnectorData )( data ) );
		m_benchmarkSummary = ( ( worldBenchmarkSummary )( callbackConnector.userData ) );
	}

	protected event OnGlobalRelease( e : inkPointerEvent )
	{
		if( e.IsHandled() )
		{
			return false;
		}
		if( !( m_settingsAcive ) && e.IsAction( 'back' ) )
		{
			e.Handle();
			ShowExitPrompt();
		}
	}

	private function ShowExitPrompt()
	{
		m_exitRequestToken = GenericMessageNotification.Show( this, GetLocalizedTextByKey( 'UI-Benchmark-ExitBenchmark' ), GetLocalizedTextByKey( 'UI-Benchmark-ExitConfirmation' ), GenericMessageNotificationType.ConfirmCancel );
		m_exitRequestToken.RegisterListener( this, 'OnCloseBenchmarkResults' );
	}

	private function SpawnSummaryLine( entryName : CName, column : EEntryColumn, const label : ref< String >, const value : ref< String > )
	{
		var spawnData : inkAsyncSpawnData;
		var lineData : BenchmarkLineData;
		lineData = new BenchmarkLineData;
		lineData.label = label;
		lineData.value = value;
		spawnData = new inkAsyncSpawnData;
		spawnData.libraryID = entryName;
		if( column == EEntryColumn.left )
		{
			spawnData.parentWidget = ( ( inkCompoundWidget )( inkCompoundRef.Get( m_leftEntriesListContainer ) ) );
		}
		else if( column == EEntryColumn.right )
		{
			spawnData.parentWidget = ( ( inkCompoundWidget )( inkCompoundRef.Get( m_rightEntriesListContainer ) ) );
		}
		spawnData.userData = lineData;
		AsyncSpawnFromLocal( spawnData, this, 'OnLineSpawned' );
	}

	private function OnLineSpawned( widget : inkWidget, userData : IScriptable )
	{
		var labelController : BenchmarkLabelController;
		var lineData : BenchmarkLineData;
		labelController = ( ( BenchmarkLabelController )( widget.GetController() ) );
		lineData = ( ( BenchmarkLineData )( userData ) );
		labelController.SetLabel( lineData.label );
		labelController.SetValue( lineData.value );
	}

	private function DisplayBenchmarkSummary()
	{
		var locOn : String;
		var locOff : String;
		var resolution : String;
		var gpuMemoryVal : String;
		var systemMemoryVal : String;
		var dlssValues : array< CName >;
		var fsr2Values : array< CName >;
		var fsr3Values : array< CName >;
		var xessValues : array< CName >;
		m_settingsAcive = false;
		locOn = GetLocalizedTextByKey( 'UI-UserActions-Yes' );
		locOff = GetLocalizedTextByKey( 'UI-UserActions-No' );
		dlssValues.PushBack( 'UI-Settings-Video-QualitySetting-Auto' );
		dlssValues.PushBack( 'UI-Settings-Video-Advanced-DLAA' );
		dlssValues.PushBack( 'UI-Settings-Video-QualitySetting-Quality' );
		dlssValues.PushBack( 'UI-Settings-Video-QualitySetting-Balanced' );
		dlssValues.PushBack( 'UI-Settings-Video-QualitySetting-Performance' );
		dlssValues.PushBack( 'UI-Settings-Video-QualitySetting-Ultra_Performance' );
		dlssValues.PushBack( 'UI-Settings-Video-Advanced-DynamicCAS' );
		fsr2Values.PushBack( 'UI-Settings-Video-QualitySetting-Auto' );
		fsr2Values.PushBack( 'UI-Settings-Video-QualitySetting-Quality' );
		fsr2Values.PushBack( 'UI-Settings-Video-QualitySetting-Balanced' );
		fsr2Values.PushBack( 'UI-Settings-Video-QualitySetting-Performance' );
		fsr2Values.PushBack( 'UI-Settings-Video-QualitySetting-Ultra_Performance' );
		fsr2Values.PushBack( 'UI-Settings-Video-Advanced-DynamicCAS' );
		fsr3Values.PushBack( 'UI-Settings-Video-QualitySetting-Auto' );
		fsr3Values.PushBack( 'UI-Settings-Video-QualitySetting-NativeAA' );
		fsr3Values.PushBack( 'UI-Settings-Video-QualitySetting-Quality' );
		fsr3Values.PushBack( 'UI-Settings-Video-QualitySetting-Balanced' );
		fsr3Values.PushBack( 'UI-Settings-Video-QualitySetting-Performance' );
		fsr3Values.PushBack( 'UI-Settings-Video-QualitySetting-Ultra_Performance' );
		fsr3Values.PushBack( 'UI-Settings-Video-Advanced-DynamicCAS' );
		xessValues.PushBack( 'UI-Settings-Video-QualitySetting-Auto' );
		xessValues.PushBack( 'UI-Settings-Video-QualitySetting-Ultra_Quality' );
		xessValues.PushBack( 'UI-Settings-Video-QualitySetting-Quality' );
		xessValues.PushBack( 'UI-Settings-Video-QualitySetting-Balanced' );
		xessValues.PushBack( 'UI-Settings-Video-QualitySetting-Performance' );
		xessValues.PushBack( 'UI-Settings-Video-QualitySetting-Ultra_Performance' );
		xessValues.PushBack( 'UI-Settings-Video-Advanced-DynamicCAS' );
		resolution = ( ( ( String )( m_benchmarkSummary.renderWidth ) ) + "x" ) + ( ( String )( m_benchmarkSummary.renderHeight ) );
		gpuMemoryVal = ( ( ( String )( m_benchmarkSummary.gpuMemory ) ) + " " ) + GetLocalizedTextByKey( 'UI-Labels-Units-Megabyte' );
		systemMemoryVal = ( ( ( String )( m_benchmarkSummary.systemMemory ) ) + " " ) + GetLocalizedTextByKey( 'UI-Labels-Units-Megabyte' );
		SpawnSummaryLine( m_sectionEntryName, EEntryColumn.left, GetLocalizedTextByKey( 'UI-Benchmark-Results' ), "" );
		SpawnSummaryLine( m_highlightLineEntryName, EEntryColumn.left, GetLocalizedTextByKey( 'UI-Benchmark-AverageFPS' ), FloatToStringPrec( m_benchmarkSummary.averageFps, 2 ) );
		SpawnSummaryLine( m_lineEntryName, EEntryColumn.left, GetLocalizedTextByKey( 'UI-Benchmark-MinFPS' ), FloatToStringPrec( m_benchmarkSummary.minFps, 2 ) );
		SpawnSummaryLine( m_lineEntryName, EEntryColumn.left, GetLocalizedTextByKey( 'UI-Benchmark-MaxFPS' ), FloatToStringPrec( m_benchmarkSummary.maxFps, 2 ) );
		SpawnSummaryLine( m_lineEntryName, EEntryColumn.left, GetLocalizedTextByKey( 'UI-Benchmark-Time' ), FloatToStringPrec( m_benchmarkSummary.time, 2 ) );
		SpawnSummaryLine( m_lineEntryName, EEntryColumn.left, GetLocalizedTextByKey( 'UI-Benchmark-FrameNumber' ), ( ( String )( m_benchmarkSummary.frameNumber ) ) );
		SpawnSummaryLine( m_lineEntryName, EEntryColumn.left, "", "" );
		SpawnSummaryLine( m_sectionEntryName, EEntryColumn.left, GetLocalizedTextByKey( 'UI-Benchmark-SystemSpecification' ), "" );
		SpawnSummaryLine( m_lineEntryName, EEntryColumn.left, GetLocalizedTextByKey( 'UI-Benchmark-GameVersion' ), m_benchmarkSummary.gameVersion );
		SpawnSummaryLine( m_lineEntryName, EEntryColumn.left, GetLocalizedTextByKey( 'UI-Benchmark-GPUModel' ), m_benchmarkSummary.gpuName );
		SpawnSummaryLine( m_lineEntryName, EEntryColumn.left, GetLocalizedTextByKey( 'UI-Benchmark-GPUMemory' ), gpuMemoryVal );
		SpawnSummaryLine( m_lineEntryName, EEntryColumn.left, GetLocalizedTextByKey( 'UI-Benchmark-GPUDriverVersion' ), m_benchmarkSummary.gpuDriverVersion );
		SpawnSummaryLine( m_lineEntryName, EEntryColumn.left, GetLocalizedTextByKey( 'UI-Benchmark-CPUModel' ), m_benchmarkSummary.cpuName );
		SpawnSummaryLine( m_lineEntryName, EEntryColumn.left, GetLocalizedTextByKey( 'UI-Benchmark-SystemMemory' ), systemMemoryVal );
		SpawnSummaryLine( m_lineEntryName, EEntryColumn.left, GetLocalizedTextByKey( 'UI-Benchmark-OSName' ), m_benchmarkSummary.osName );
		SpawnSummaryLine( m_lineEntryName, EEntryColumn.left, GetLocalizedTextByKey( 'UI-Benchmark-OSVersion' ), m_benchmarkSummary.osVersion );
		SpawnSummaryLine( m_sectionEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Labels-Settings' ), "" );
		SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Benchmark-PresetName' ), GetLocalizedTextByKey( m_benchmarkSummary.presetLocalizedName ) );
		SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-TextureQuality' ), GetLocalizedTextByKey( m_benchmarkSummary.textureQualityPresetLocalizedName ) );
		SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Display-Resolution' ), resolution );
		SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Display-WindowMode' ), GetWindowModeLocKey( m_benchmarkSummary.windowMode ) );
		SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Benchmark-VerticalSync' ), ( ( m_benchmarkSummary.verticalSync ) ? ( locOn ) : ( locOff ) ) );
		if( m_benchmarkSummary.fpsClamp > 0 )
		{
			SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-MaximumFPS' ), ( ( String )( m_benchmarkSummary.fpsClamp ) ) );
		}
		else
		{
			SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-MaximumFPS' ), locOff );
		}
		SpawnSummaryLine( m_sectionEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-FrameGeneration' ), "" );
		if( m_benchmarkSummary.frameGenerationType == 1 )
		{
			SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-DLSS_FrameGeneration' ), ( ( m_benchmarkSummary.DLSSFrameGenEnabled ) ? ( locOn ) : ( locOff ) ) );
		}
		else if( m_benchmarkSummary.frameGenerationType == 2 )
		{
			SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-FSR3_FrameGeneration' ), ( ( m_benchmarkSummary.FSR3FrameGenEnabled ) ? ( locOn ) : ( locOff ) ) );
		}
		else
		{
			SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-DLSS_FrameGeneration' ), ( ( m_benchmarkSummary.DLSSFrameGenEnabled ) ? ( locOn ) : ( locOff ) ) );
			SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-FSR3_FrameGeneration' ), ( ( m_benchmarkSummary.FSR3FrameGenEnabled ) ? ( locOn ) : ( locOff ) ) );
		}
		SpawnSummaryLine( m_sectionEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-ResolutionScaling' ), "" );
		if( m_benchmarkSummary.upscalingType == 1 )
		{
			SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Benchmark-DLSSQuality' ), GetLocalizedTextByKey( dlssValues[ m_benchmarkSummary.DLSSQuality ] ) );
			if( m_benchmarkSummary.DLAAEnabled )
			{
				SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-DLAA_Sharpness' ), FloatToStringPrec( m_benchmarkSummary.DLAASharpness, 2 ) );
			}
			else
			{
				SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-DLSS_Sharpness' ), FloatToStringPrec( m_benchmarkSummary.DLSSSharpness, 2 ) );
			}
			SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Benchmark-DLSSDEnabled' ), ( ( m_benchmarkSummary.DLSSDEnabled ) ? ( locOn ) : ( locOff ) ) );
			if( m_benchmarkSummary.DLSSQuality == 6 )
			{
				SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-TargetFPS' ), ( ( String )( m_benchmarkSummary.DRSTargetFPS ) ) );
				SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-MinimalResolution' ), ( ( String )( m_benchmarkSummary.DRSMinimalResolutionPercentage ) ) + "%" );
				SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-MaximalResolution' ), ( ( String )( m_benchmarkSummary.DRSMaximalResolutionPercentage ) ) + "%" );
			}
		}
		else if( m_benchmarkSummary.upscalingType == 2 )
		{
			SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-FSR2' ), GetLocalizedTextByKey( fsr2Values[ m_benchmarkSummary.FSR2Quality ] ) );
			SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-FSR2_Sharpness' ), FloatToStringPrec( m_benchmarkSummary.FSR2Sharpness, 2 ) );
			if( m_benchmarkSummary.FSR2Quality == 5 )
			{
				SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-TargetFPS' ), ( ( String )( m_benchmarkSummary.DRSTargetFPS ) ) );
				SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-MinimalResolution' ), ( ( String )( m_benchmarkSummary.DRSMinimalResolutionPercentage ) ) + "%" );
				SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-MaximalResolution' ), ( ( String )( m_benchmarkSummary.DRSMaximalResolutionPercentage ) ) + "%" );
			}
		}
		else if( m_benchmarkSummary.upscalingType == 3 )
		{
			SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-FSR3' ), GetLocalizedTextByKey( fsr3Values[ m_benchmarkSummary.FSR3Quality ] ) );
			SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-FSR3_Sharpness' ), FloatToStringPrec( m_benchmarkSummary.FSR3Sharpness, 2 ) );
			if( m_benchmarkSummary.FSR2Quality == 6 )
			{
				SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-TargetFPS' ), ( ( String )( m_benchmarkSummary.DRSTargetFPS ) ) );
				SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-MinimalResolution' ), ( ( String )( m_benchmarkSummary.DRSMinimalResolutionPercentage ) ) + "%" );
				SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-MaximalResolution' ), ( ( String )( m_benchmarkSummary.DRSMaximalResolutionPercentage ) ) + "%" );
			}
		}
		else if( m_benchmarkSummary.upscalingType == 4 )
		{
			SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-XeSS' ), GetLocalizedTextByKey( xessValues[ m_benchmarkSummary.XeSSQuality ] ) );
			SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-XeSS_Sharpness' ), FloatToStringPrec( m_benchmarkSummary.XeSSSharpness, 2 ) );
			if( m_benchmarkSummary.XeSSQuality == 6 )
			{
				SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-TargetFPS' ), ( ( String )( m_benchmarkSummary.DRSTargetFPS ) ) );
				SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-MinimalResolution' ), ( ( String )( m_benchmarkSummary.DRSMinimalResolutionPercentage ) ) + "%" );
				SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-MaximalResolution' ), ( ( String )( m_benchmarkSummary.DRSMaximalResolutionPercentage ) ) + "%" );
			}
		}
		else
		{
			SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Benchmark-DLSSEnabled' ), ( ( m_benchmarkSummary.DLSSEnabled ) ? ( locOn ) : ( locOff ) ) );
			SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Benchmark-FSR2Enabled' ), ( ( m_benchmarkSummary.FSR2Enabled ) ? ( locOn ) : ( locOff ) ) );
			SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Benchmark-XeSSEnabled' ), ( ( m_benchmarkSummary.XeSSEnabled ) ? ( locOn ) : ( locOff ) ) );
		}
		SpawnSummaryLine( m_sectionEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-RayTracing' ), "" );
		SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Benchmark-RayTracingEnabled' ), ( ( m_benchmarkSummary.rayTracingEnabled ) ? ( locOn ) : ( locOff ) ) );
		if( m_benchmarkSummary.rayTracingEnabled )
		{
			if( !( m_benchmarkSummary.rayTracedPathTracingEnabled ) )
			{
				SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-RayTracedReflections' ), ( ( m_benchmarkSummary.rayTracedReflections ) ? ( locOn ) : ( locOff ) ) );
				SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-RayTracedSunShadows' ), ( ( m_benchmarkSummary.rayTracedSunShadows ) ? ( locOn ) : ( locOff ) ) );
				SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-RayTracedLocalShadows' ), ( ( m_benchmarkSummary.rayTracedLocalShadows ) ? ( locOn ) : ( locOff ) ) );
				SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-RayTracedLighting' ), GetRayTracedLightingQualityLocKey( m_benchmarkSummary.rayTracedLightingQuality ) );
			}
			SpawnSummaryLine( m_lineEntryName, EEntryColumn.right, GetLocalizedTextByKey( 'UI-Settings-Video-Advanced-RayTracedPathTracing' ), ( ( m_benchmarkSummary.rayTracedPathTracingEnabled ) ? ( locOn ) : ( locOff ) ) );
		}
	}

	private function GetWindowModeLocKey( windowMode : Uint8 ) : String
	{
		var locKey : String;
		switch( windowMode )
		{
			case 0:
				locKey = "UI-Settings-Video-WindowModeSetting-Windowed";
			break;
			case 1:
				locKey = "UI-Settings-Video-WindowModeSetting-BorderlessWindowed";
			break;
			case 2:
				locKey = "UI-Settings-Video-WindowModeSetting-Fullscreen";
			break;
			default:
				locKey = "Common-Characters-SymbolForUnknown";
			break;
		}
		return locKey;
	}

	private function GetRayTracedLightingQualityLocKey( RTLightQuality : Int32 ) : String
	{
		var locKey : String;
		switch( RTLightQuality )
		{
			case 0:
				locKey = "UI-Settings-Video-QualitySetting-Off";
			break;
			case 1:
				locKey = "UI-Settings-Video-QualitySetting-Medium";
			break;
			case 2:
				locKey = "UI-Settings-Video-QualitySetting-Ultra";
			break;
			case 3:
				locKey = "UI-Settings-Video-QualitySetting-Insane";
			break;
			default:
				locKey = "Common-Characters-SymbolForUnknown";
			break;
		}
		return locKey;
	}

}

