summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-18 04:57:15 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-18 04:57:15 +0300
commitec6c80d170c4a30e76abc22c889aa8cf27fb45a4 (patch)
tree731b2ff100005f6deb5951ff516d45897c9f94fe /src/gui
parentea7ce2d1099761d4f10a1985cc1491dd306093fb (diff)
downloadplus-ec6c80d170c4a30e76abc22c889aa8cf27fb45a4.tar.gz
plus-ec6c80d170c4a30e76abc22c889aa8cf27fb45a4.tar.bz2
plus-ec6c80d170c4a30e76abc22c889aa8cf27fb45a4.tar.xz
plus-ec6c80d170c4a30e76abc22c889aa8cf27fb45a4.zip
Remove default parameter from font constructor and load function.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/fonts/font.h4
-rw-r--r--src/gui/gui.cpp16
2 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/fonts/font.h b/src/gui/fonts/font.h
index f4f30a8be..4f3670374 100644
--- a/src/gui/fonts/font.h
+++ b/src/gui/fonts/font.h
@@ -90,7 +90,7 @@ class Font final
public:
Font(std::string filename,
int size,
- const int style = 0);
+ const int style);
A_DELETE_COPY(Font)
@@ -98,7 +98,7 @@ class Font final
void loadFont(std::string filename,
const int size,
- const int style = 0) restrict2;
+ const int style) restrict2;
int getWidth(const std::string &text) const restrict2 A_WARN_UNUSED;
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 706a5f0b8..c5d6bc95c 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -193,7 +193,7 @@ void Gui::postInit(Graphics *const graphics)
if (fontFile.empty())
fontFile = branding.getStringValue("font");
- mGuiFont = new Font(fontFile, fontSize);
+ mGuiFont = new Font(fontFile, fontSize, TTF_STYLE_NORMAL);
// Set particle font
fontFile = config.getValue("particleFont", "");
@@ -219,21 +219,21 @@ void Gui::postInit(Graphics *const graphics)
if (fontFile.empty())
fontFile = branding.getStringValue("boldFont");
- boldFont = new Font(fontFile, fontSize);
+ boldFont = new Font(fontFile, fontSize, TTF_STYLE_NORMAL);
// Set help font
fontFile = config.getValue("helpFont", "");
if (fontFile.empty())
fontFile = branding.getStringValue("helpFont");
- mHelpFont = new Font(fontFile, fontSize);
+ mHelpFont = new Font(fontFile, fontSize, TTF_STYLE_NORMAL);
// Set secure font
fontFile = config.getValue("secureFont", "");
if (fontFile.empty())
fontFile = branding.getStringValue("secureFont");
- mSecureFont = new Font(fontFile, fontSize);
+ mSecureFont = new Font(fontFile, fontSize, TTF_STYLE_NORMAL);
// Set npc font
const int npcFontSize = config.getIntValue("npcfontSize");
@@ -253,7 +253,7 @@ void Gui::postInit(Graphics *const graphics)
if (fontFile.empty())
fontFile = branding.getStringValue("npcFont");
- mNpcFont = new Font(fontFile, npcFontSize);
+ mNpcFont = new Font(fontFile, npcFontSize, TTF_STYLE_NORMAL);
Widget::setGlobalFont(mGuiFont);
@@ -816,7 +816,7 @@ void Gui::updateFonts()
if (fontFile.empty())
fontFile = branding.getStringValue("font");
- mGuiFont->loadFont(fontFile, fontSize);
+ mGuiFont->loadFont(fontFile, fontSize, TTF_STYLE_NORMAL);
fontFile = config.getValue("particleFont", "");
if (fontFile.empty())
@@ -828,7 +828,7 @@ void Gui::updateFonts()
if (fontFile.empty())
fontFile = branding.getStringValue("boldFont");
- boldFont->loadFont(fontFile, fontSize);
+ boldFont->loadFont(fontFile, fontSize, TTF_STYLE_NORMAL);
const int npcFontSize = config.getIntValue("npcfontSize");
@@ -836,7 +836,7 @@ void Gui::updateFonts()
if (fontFile.empty())
fontFile = branding.getStringValue("npcFont");
- mNpcFont->loadFont(fontFile, npcFontSize);
+ mNpcFont->loadFont(fontFile, npcFontSize, TTF_STYLE_NORMAL);
}
void Gui::distributeMouseEvent(Widget *const source,