You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Themes are basic json files which can change the named colors that the editor uses for its UI. They work similarly to config files in that the same theme in a user dir overrides the project dir and the base dir. Themes only work in the editor or standalone programs. Not supported in UMG or shipping games [CL 14179270 by Matt Kuhlenschmidt in ue5-main branch]
65 lines
1.3 KiB
C++
65 lines
1.3 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())
|
|
{
|
|
#if ALLOW_THEMES
|
|
USlateThemeManager::Get().ValidateActiveTheme();
|
|
#endif
|
|
|
|
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)
|