2014-12-07 19:09:38 -05:00
|
|
|
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#include "EditorStylePrivatePCH.h"
|
2015-01-06 07:29:48 -05:00
|
|
|
#include "UnitConversion.h"
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
/* UEditorStyleSettings interface
|
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
2014-10-14 10:29:11 -04:00
|
|
|
UEditorStyleSettings::UEditorStyleSettings( const FObjectInitializer& ObjectInitializer )
|
|
|
|
|
: Super(ObjectInitializer)
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
SelectionColor = FLinearColor(0.828f, 0.364f, 0.003f);
|
|
|
|
|
InactiveSelectionColor = FLinearColor(0.25f, 0.25f, 0.25f);
|
|
|
|
|
PressedSelectionColor = FLinearColor(0.701f, 0.225f, 0.003f);
|
|
|
|
|
|
2015-03-02 17:01:00 -05:00
|
|
|
bOpenAssetEditorTabsInNewWindow = true;
|
2015-03-02 15:32:13 -05:00
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
bShowFriendlyNames = true;
|
2014-11-10 15:13:41 -05:00
|
|
|
LogTimestampMode = ELogTimes::None;
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
2015-02-09 11:52:11 -05:00
|
|
|
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();
|
|
|
|
|
}
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#if WITH_EDITOR
|
|
|
|
|
|
|
|
|
|
void UEditorStyleSettings::PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent)
|
|
|
|
|
{
|
|
|
|
|
Super::PostEditChangeProperty(PropertyChangedEvent);
|
|
|
|
|
|
|
|
|
|
const FName Name = (PropertyChangedEvent.Property != nullptr) ? PropertyChangedEvent.Property->GetFName() : NAME_None;
|
|
|
|
|
|
2015-01-06 07:29:48 -05:00
|
|
|
if (Name == GET_MEMBER_NAME_CHECKED(UEditorStyleSettings, bEnableWindowAnimations))
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
FSlateApplication::Get().EnableMenuAnimations(bEnableWindowAnimations);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if (!FUnrealEdMisc::Get().IsDeletePreferences())
|
|
|
|
|
{
|
|
|
|
|
SaveConfig();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SettingChangedEvent.Broadcast(Name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|