Files
UnrealEngineUWP/Engine/Source/Editor/EditorStyle/Private/EditorStyleClasses.cpp
Andrew Rodham 3ac1e0da19 Added editor project setting to define whether to display units in imperial or metric (or not at all)
Also added a default input unit that is used when no units are specified on a text input.

This addresses UE-11863 and UE-9313

[CL 2499638 by Andrew Rodham in Main branch]
2015-04-02 05:30:34 -04:00

53 lines
1.5 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#include "EditorStylePrivatePCH.h"
#include "UnitConversion.h"
/* UEditorStyleSettings interface
*****************************************************************************/
UEditorStyleSettings::UEditorStyleSettings( const FObjectInitializer& ObjectInitializer )
: Super(ObjectInitializer)
{
SelectionColor = FLinearColor(0.828f, 0.364f, 0.003f);
InactiveSelectionColor = FLinearColor(0.25f, 0.25f, 0.25f);
PressedSelectionColor = FLinearColor(0.701f, 0.225f, 0.003f);
bOpenAssetEditorTabsInNewWindow = true;
bShowFriendlyNames = true;
LogTimestampMode = ELogTimes::None;
}
FLinearColor UEditorStyleSettings::GetSubduedSelectionColor() const
{
FLinearColor SubduedSelectionColor = SelectionColor.LinearRGBToHSV();
SubduedSelectionColor.G *= 0.55f; // take the saturation
SubduedSelectionColor.B *= 0.8f; // and brightness down
return SubduedSelectionColor.HSVToLinearRGB();
}
#if WITH_EDITOR
void UEditorStyleSettings::PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent)
{
Super::PostEditChangeProperty(PropertyChangedEvent);
const FName Name = (PropertyChangedEvent.Property != nullptr) ? PropertyChangedEvent.Property->GetFName() : NAME_None;
if (Name == GET_MEMBER_NAME_CHECKED(UEditorStyleSettings, bEnableWindowAnimations))
{
FSlateApplication::Get().EnableMenuAnimations(bEnableWindowAnimations);
}
// if (!FUnrealEdMisc::Get().IsDeletePreferences())
{
SaveConfig();
}
SettingChangedEvent.Broadcast(Name);
}
#endif