Files
UnrealEngineUWP/Engine/Source/Programs/SlateUGS/Private/SlateUGSStyle.cpp
robert seiver 4d5e52425e Started a style set for SlateUGS (SlateUGSStyle.h/cpp). Started the UI for horde badges, displaying it with phony data.
Converted uses of FAppStyle to FSlateUGSStyle.
Added temporary phony data for build status circles on the left of the build list as well

#fyi Brandon.Schaefer
#jira none
#rb none
#preflight none

[CL 21427773 by robert seiver in ue5-main branch]
2022-08-17 13:57:05 -04:00

54 lines
1.4 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "SlateUGSStyle.h"
#include "Styling/AppStyle.h"
#include "Styling/SlateStyleMacros.h"
#include "Styling/SlateStyleRegistry.h"
#include "Styling/SlateTypes.h"
#include "Styling/SlateStyleMacros.h"
#include "Styling/StarshipCoreStyle.h"
#include "Styling/SlateStyleRegistry.h"
FName FSlateUGSStyle::StyleName("SlateUGSStyle");
TUniquePtr<FSlateUGSStyle> FSlateUGSStyle::Inst(nullptr);
const FName& FSlateUGSStyle::GetStyleSetName() const
{
return StyleName;
}
const FSlateUGSStyle& FSlateUGSStyle::Get()
{
if (!Inst.IsValid())
{
Inst = TUniquePtr<FSlateUGSStyle>(new FSlateUGSStyle);
}
return *(Inst.Get());
}
void FSlateUGSStyle::Shutdown()
{
Inst.Reset();
}
FSlateUGSStyle::FSlateUGSStyle() : FSlateStyleSet(StyleName)
{
SetParentStyleName(FAppStyle::GetAppStyleSetName());
SetContentRoot(FPaths::EngineContentDir() / TEXT("Editor/Slate"));
SetCoreContentRoot(FPaths::EngineContentDir() / TEXT("Slate"));
Set("HordeBadge.Color.Unknown", FLinearColor(0.50f, 0.50f, 0.50f));
Set("HordeBadge.Color.Error", FLinearColor(1.00f, 0.10f, 0.10f));
Set("HordeBadge.Color.Warning", FLinearColor(1.00f, 0.75f, 0.00f));
Set("HordeBadge.Color.Success", FLinearColor(0.25f, 1.00f, 0.25f));
Set("HordeBadge.Color.Pending", FLinearColor(0.25f, 0.75f, 1.00f));
FSlateStyleRegistry::RegisterSlateStyle(*this);
}
FSlateUGSStyle::~FSlateUGSStyle()
{
FSlateStyleRegistry::UnRegisterSlateStyle(*this);
}