You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
64 lines
1.5 KiB
C++
64 lines
1.5 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Modules/ModuleManager.h"
|
|
#include "Interfaces/IEditorStyleModule.h"
|
|
#include "SlateEditorStyle.h"
|
|
#include "StarshipStyle.h"
|
|
#include "Styling/CoreStyle.h"
|
|
#include "Styling/StyleColors.h"
|
|
|
|
|
|
/**
|
|
* Implements the Editor style module, loaded by SlateApplication dynamically at startup.
|
|
*/
|
|
class FEditorStyleModule
|
|
: public IEditorStyleModule
|
|
{
|
|
public:
|
|
|
|
// IEditorStyleModule interface
|
|
|
|
virtual void StartupModule( ) override
|
|
{
|
|
if (FCoreStyle::IsStarshipStyle())
|
|
{
|
|
// This is necessary because the core style loads the color table before ProcessNewlyLoadedUObjects is called which means none of the config properties are in the classs property link at that time.
|
|
UStyleColorTable::Get().ReloadConfig();
|
|
|
|
bUsingStarshipStyle = true;
|
|
FStarshipEditorStyle::Initialize();
|
|
|
|
// set the application style to be the editor style
|
|
FAppStyle::SetAppStyleSetName(FStarshipEditorStyle::GetStyleSetName());
|
|
|
|
}
|
|
else
|
|
{
|
|
FSlateEditorStyle::Initialize();
|
|
|
|
// set the application style to be the editor style
|
|
FAppStyle::SetAppStyleSetName(FEditorStyle::GetStyleSetName());
|
|
}
|
|
}
|
|
|
|
virtual void ShutdownModule( ) override
|
|
{
|
|
if (bUsingStarshipStyle)
|
|
{
|
|
FStarshipEditorStyle::Shutdown();
|
|
}
|
|
else
|
|
{
|
|
FSlateEditorStyle::Shutdown();
|
|
}
|
|
}
|
|
|
|
// End IModuleInterface interface
|
|
private:
|
|
bool bUsingStarshipStyle = false;
|
|
};
|
|
|
|
|
|
IMPLEMENT_MODULE(FEditorStyleModule, EditorStyle)
|