Files
UnrealEngineUWP/Engine/Source/Developer/FriendsAndChat/Private/FriendsFontStyleService.cpp
Antony Carter 933ada3b0c Merging
//depot/UE4-LauncherDev/...

to //depot/UE4/...

[CL 2602006 by Antony Carter in Main branch]
2015-06-26 07:15:12 -04:00

55 lines
1.3 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#include "FriendsAndChatPrivatePCH.h"
#include "FriendsFontStyleService.h"
class FFriendsFontStyleServiceImpl
: public FFriendsFontStyleService
{
public:
virtual void SetFontStyles(const FFriendsFontStyle& InFriendsNormalFontStyle) override
{
FriendsNormalFontStyle = InFriendsNormalFontStyle;
}
virtual void SetUserFontSize(EChatFontType::Type InFontSize) override
{
FontSize = InFontSize;
}
virtual FSlateFontInfo GetNormalFont() override
{
if (FontSize == EChatFontType::Large)
{
return FriendsNormalFontStyle.FriendsFontLarge;
}
return FriendsNormalFontStyle.FriendsFontNormal;
}
virtual FSlateFontInfo GetNormalBoldFont() override
{
if (FontSize == EChatFontType::Large)
{
return FriendsNormalFontStyle.FriendsFontLargeBold;
}
return FriendsNormalFontStyle.FriendsFontNormalBold;
}
private:
FFriendsFontStyleServiceImpl()
{
FontSize = EChatFontType::Standard;
}
FFriendsFontStyle FriendsNormalFontStyle;
EChatFontType::Type FontSize;
friend FFriendsFontStyleServiceFactory;
};
TSharedRef< FFriendsFontStyleService > FFriendsFontStyleServiceFactory::Create()
{
TSharedRef< FFriendsFontStyleServiceImpl > StyleService(new FFriendsFontStyleServiceImpl());
return StyleService;
}