Add medium-sized font to FontManager

This commit is contained in:
VelocityRa 2017-01-04 21:30:02 +02:00
parent 10a13b607a
commit c1df4460fa
3 changed files with 6 additions and 1 deletions

View File

@ -79,6 +79,9 @@ namespace spades {
largeFont.Set(
new ngclient::FTFont(renderer, GlobalFontInfo::GetInstance().guiFontSet, 34.f, 48.f),
false);
mediumFont.Set(
new ngclient::FTFont(renderer, GlobalFontInfo::GetInstance().guiFontSet, 24.f, 32.f),
false);
headingFont.Set(
new ngclient::FTFont(renderer, GlobalFontInfo::GetInstance().guiFontSet, 20.f, 26.f),
false);

View File

@ -31,6 +31,7 @@ namespace spades {
IFont *GetSquareDesignFont() { return squareDesignFont; }
IFont *GetLargeFont() { return largeFont; }
IFont *GetMediumFont() { return mediumFont; }
IFont *GetHeadingFont() { return headingFont; }
IFont *GetGuiFont() { return guiFont; }
@ -40,6 +41,7 @@ namespace spades {
private:
Handle<IFont> squareDesignFont;
Handle<IFont> largeFont;
Handle<IFont> mediumFont;
Handle<IFont> headingFont;
Handle<IFont> guiFont;
};

View File

@ -68,7 +68,7 @@ namespace spades {
}) != spectatorString.end();
spectatorFont = has_special_char ?
client->fontManager->GetLargeFont() :
client->fontManager->GetMediumFont() :
client->fontManager->GetSquareDesignFont();
}