2022-09-24 13:31:25 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2022-08-22 21:20:36 -04:00
|
|
|
|
|
|
|
|
#include "DrawPrimitiveDebuggerConfig.h"
|
2022-08-22 21:23:48 -04:00
|
|
|
#include "Misc/ConfigCacheIni.h"
|
2022-08-22 21:20:36 -04:00
|
|
|
|
2022-09-24 13:31:25 -04:00
|
|
|
#include UE_INLINE_GENERATED_CPP_BY_NAME(DrawPrimitiveDebuggerConfig)
|
|
|
|
|
|
2022-08-22 21:20:36 -04:00
|
|
|
void UDrawPrimitiveDebuggerUserSettings::SetFontSize(const int32 InFontSize)
|
|
|
|
|
{
|
|
|
|
|
UDrawPrimitiveDebuggerUserSettings* Settings = GetMutableDefault<UDrawPrimitiveDebuggerUserSettings>();
|
|
|
|
|
Settings->FontSize = FMath::Clamp(InFontSize, 1, 100);
|
|
|
|
|
|
|
|
|
|
const FString ConfigFileName = Settings->GetProjectUserConfigFilename();
|
|
|
|
|
GConfig->SetInt(TEXT("/Script/DrawPrimitiveDebugger.DrawPrimitiveDebuggerUserSettings"), TEXT("FontSize"), Settings->FontSize, *ConfigFileName);
|
|
|
|
|
GConfig->Flush(false);
|
|
|
|
|
}
|
2022-09-24 13:31:25 -04:00
|
|
|
|