summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-16 22:17:22 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-16 22:17:22 +0300
commit6e6c5b2ba399e0ed364ada843c4c759ee54de219 (patch)
tree562e6a840c856ba8c4d35c6806020289c65d54d2 /src/gui/windows
parent82ac4641828ec7387863bb18cf4493190c4cc68f (diff)
downloadmanaverse-6e6c5b2ba399e0ed364ada843c4c759ee54de219.tar.gz
manaverse-6e6c5b2ba399e0ed364ada843c4c759ee54de219.tar.bz2
manaverse-6e6c5b2ba399e0ed364ada843c4c759ee54de219.tar.xz
manaverse-6e6c5b2ba399e0ed364ada843c4c759ee54de219.zip
combine font classes in one.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/chatwindow.cpp2
-rw-r--r--src/gui/windows/confirmdialog.cpp2
-rw-r--r--src/gui/windows/didyouknowwindow.cpp2
-rw-r--r--src/gui/windows/equipmentwindow.cpp5
-rw-r--r--src/gui/windows/helpwindow.cpp2
-rw-r--r--src/gui/windows/inventorywindow.cpp4
-rw-r--r--src/gui/windows/npcdialog.cpp6
-rw-r--r--src/gui/windows/okdialog.cpp2
-rw-r--r--src/gui/windows/questswindow.cpp2
-rw-r--r--src/gui/windows/serverdialog.cpp10
-rw-r--r--src/gui/windows/skilldialog.cpp5
-rw-r--r--src/gui/windows/textdialog.cpp4
-rw-r--r--src/gui/windows/tradewindow.cpp6
13 files changed, 21 insertions, 31 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index cbff544fc..e49c78803 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -39,7 +39,7 @@
#include "input/inputmanager.h"
-#include "gui/sdlfont.h"
+#include "gui/font.h"
#include "gui/sdlinput.h"
#include "gui/viewport.h"
diff --git a/src/gui/windows/confirmdialog.cpp b/src/gui/windows/confirmdialog.cpp
index 499538388..6eb21622d 100644
--- a/src/gui/windows/confirmdialog.cpp
+++ b/src/gui/windows/confirmdialog.cpp
@@ -29,7 +29,7 @@
#include "utils/gettext.h"
-#include "gui/base/font.hpp"
+#include "gui/font.h"
#include "debug.h"
diff --git a/src/gui/windows/didyouknowwindow.cpp b/src/gui/windows/didyouknowwindow.cpp
index 9b3ba857c..58e6d9c24 100644
--- a/src/gui/windows/didyouknowwindow.cpp
+++ b/src/gui/windows/didyouknowwindow.cpp
@@ -24,7 +24,7 @@
#include "configuration.h"
-#include "gui/sdlfont.h"
+#include "gui/font.h"
#include "gui/windows/setupwindow.h"
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index 5caf30df1..6f2bb3b3d 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -32,6 +32,7 @@
#include "being/localplayer.h"
#include "being/playerinfo.h"
+#include "gui/font.h"
#include "gui/viewport.h"
#include "gui/popups/itempopup.h"
@@ -46,8 +47,6 @@
#include "utils/dtor.h"
#include "utils/gettext.h"
-#include "gui/base/font.hpp"
-
#include "debug.h"
static const int BOX_COUNT = 13;
@@ -163,7 +162,7 @@ void EquipmentWindow::draw(Graphics *graphics)
Window::draw(graphics);
int i = 0;
- gcn::Font *const font = getFont();
+ Font *const font = getFont();
const int fontHeight = font->getHeight();
if (isBatchDrawRenders(openGLMode))
diff --git a/src/gui/windows/helpwindow.cpp b/src/gui/windows/helpwindow.cpp
index 95bea6e00..0b31a410b 100644
--- a/src/gui/windows/helpwindow.cpp
+++ b/src/gui/windows/helpwindow.cpp
@@ -24,7 +24,7 @@
#include "configuration.h"
-#include "gui/sdlfont.h"
+#include "gui/font.h"
#include "gui/windows/didyouknowwindow.h"
#include "gui/windows/setupwindow.h"
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index 3eb10e0e8..c95c2c54e 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -32,6 +32,7 @@
#include "input/inputmanager.h"
+#include "gui/font.h"
#include "gui/viewport.h"
#include "gui/popups/textpopup.h"
@@ -43,7 +44,6 @@
#include "gui/windows/shopwindow.h"
#include "gui/windows/tradewindow.h"
-
#include "gui/widgets/button.h"
#include "gui/widgets/dropdown.h"
#include "gui/widgets/itemcontainer.h"
@@ -58,8 +58,6 @@
#include "utils/gettext.h"
-#include "gui/base/font.hpp"
-
#include <string>
#include "debug.h"
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index a883406e7..d1823d5cf 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -32,8 +32,8 @@
#include "being/being.h"
+#include "gui/font.h"
#include "gui/gui.h"
-#include "gui/sdlfont.h"
#include "gui/viewport.h"
#include "gui/windows/inventorywindow.h"
@@ -59,8 +59,6 @@
#include "utils/copynpaste.h"
#include "utils/gettext.h"
-#include "gui/base/font.hpp"
-
#include "debug.h"
// TRANSLATORS: npc dialog button
@@ -170,7 +168,7 @@ NpcDialog::NpcDialog(const int npcId) :
mTextField->setVisible(true);
mIntField->setVisible(true);
- const gcn::Font *const fnt = mButton->getFont();
+ const Font *const fnt = mButton->getFont();
int width = std::max(fnt->getWidth(CAPTION_WAITING),
fnt->getWidth(CAPTION_NEXT));
width = std::max(width, fnt->getWidth(CAPTION_CLOSE));
diff --git a/src/gui/windows/okdialog.cpp b/src/gui/windows/okdialog.cpp
index b9f26da20..3d734b7ad 100644
--- a/src/gui/windows/okdialog.cpp
+++ b/src/gui/windows/okdialog.cpp
@@ -30,7 +30,7 @@
#include "utils/gettext.h"
-#include "gui/base/font.hpp"
+#include "gui/font.h"
#include "debug.h"
diff --git a/src/gui/windows/questswindow.cpp b/src/gui/windows/questswindow.cpp
index 681949145..2e8c5dcc8 100644
--- a/src/gui/windows/questswindow.cpp
+++ b/src/gui/windows/questswindow.cpp
@@ -26,7 +26,7 @@
#include "being/localplayer.h"
-#include "gui/sdlfont.h"
+#include "gui/font.h"
#include "gui/widgets/browserbox.h"
#include "gui/widgets/button.h"
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index ce5c3c815..fb2f5258b 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -31,7 +31,7 @@
#include "input/keydata.h"
-#include "gui/sdlfont.h"
+#include "gui/font.h"
#include "gui/windows/editserverdialog.h"
#include "gui/windows/logindialog.h"
@@ -45,8 +45,6 @@
#include "utils/gettext.h"
#include "utils/langs.h"
-#include "gui/base/font.hpp"
-
#include <string>
#include "debug.h"
@@ -182,8 +180,8 @@ public:
height));
}
- gcn::Font *const font1 = boldFont;
- gcn::Font *const font2 = getFont();
+ Font *const font1 = boldFont;
+ Font *const font2 = getFont();
const int fontHeight = font1->getHeight();
const int pad1 = fontHeight + mPadding;
const int pad2 = height / 4 + mPadding;
@@ -644,7 +642,7 @@ void ServerDialog::loadServers(const bool addNew)
version = strprintf(_("requires v%s"), version.c_str());
}
- const gcn::Font *const font = gui->getFont();
+ const Font *const font = gui->getFont();
for_each_xml_child_node(subNode, serverNode)
{
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index 8ec8486e3..413f73226 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -29,6 +29,7 @@
#include "being/localplayer.h"
+#include "gui/font.h"
#include "gui/viewport.h"
#include "gui/popups/textpopup.h"
@@ -53,8 +54,6 @@
#include "resources/beingcommon.h"
-#include "gui/base/font.hpp"
-
#include "debug.h"
class SkillListBox final : public ListBox
@@ -121,7 +120,7 @@ class SkillListBox final : public ListBox
// Draw the list elements
graphics->setColorAll(mTextColor, mTextColor2);
- gcn::Font *const font = getFont();
+ Font *const font = getFont();
const int space = font->getHeight() + mSpacing;
const int width2 = getWidth() - mPadding;
for (int i = 0, y = 1;
diff --git a/src/gui/windows/textdialog.cpp b/src/gui/windows/textdialog.cpp
index c4ff71eb7..9b7bb3eb1 100644
--- a/src/gui/windows/textdialog.cpp
+++ b/src/gui/windows/textdialog.cpp
@@ -30,7 +30,7 @@
#include "utils/gettext.h"
-#include "gui/base/font.hpp"
+#include "gui/font.h"
#include "debug.h"
@@ -68,7 +68,7 @@ TextDialog::TextDialog(const std::string &restrict title,
place(2, 2, mOkButton);
place(3, 2, cancelButton);
- const gcn::Font *const font = getFont();
+ const Font *const font = getFont();
if (font)
{
int width = font->getWidth(title);
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index 1793fc2fb..d94b78c34 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -31,7 +31,7 @@
#include "being/playerinfo.h"
#include "being/playerrelations.h"
-#include "gui/sdlfont.h"
+#include "gui/font.h"
#include "gui/windows/inventorywindow.h"
#include "gui/windows/itemamountwindow.h"
@@ -51,8 +51,6 @@
#include "utils/gettext.h"
-#include "gui/base/font.hpp"
-
#include "debug.h"
// TRANSLATORS: trade window button
@@ -102,7 +100,7 @@ TradeWindow::TradeWindow():
if (setupWindow)
setupWindow->registerWindowForReset(this);
- const gcn::Font *const fnt = mOkButton->getFont();
+ const Font *const fnt = mOkButton->getFont();
int width = std::max(fnt->getWidth(CAPTION_PROPOSE),
fnt->getWidth(CAPTION_CONFIRMED));
width = std::max(width, fnt->getWidth(CAPTION_ACCEPT));