summaryrefslogtreecommitdiff
path: root/src/text.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-05-10 22:07:43 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-05-10 22:10:03 +0200
commitcba524cbd0641cdf9e2e19eda453ab7518d8dca0 (patch)
tree09b21ee1d0c1947b9d5bed1954494c57ae74f946 /src/text.cpp
parent8bd92398316cb308c680cd1a1d4b3dd4f049b450 (diff)
downloadmana-client-cba524cbd0641cdf9e2e19eda453ab7518d8dca0.tar.gz
mana-client-cba524cbd0641cdf9e2e19eda453ab7518d8dca0.tar.bz2
mana-client-cba524cbd0641cdf9e2e19eda453ab7518d8dca0.tar.xz
mana-client-cba524cbd0641cdf9e2e19eda453ab7518d8dca0.zip
Don't show player names and overhead text in bold
I think it makes the game look too messy. But we should probably add an option to allow enabling this.
Diffstat (limited to 'src/text.cpp')
-rw-r--r--src/text.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/text.cpp b/src/text.cpp
index 57aaa54f..384a048f 100644
--- a/src/text.cpp
+++ b/src/text.cpp
@@ -42,6 +42,7 @@ Text::Text(const std::string &text, int x, int y,
const gcn::Color* color, bool isSpeech) :
mText(text),
mColor(color),
+ mFont(gui->getFont()),
mIsSpeech(isSpeech)
{
if (textManager == 0)
@@ -69,8 +70,8 @@ Text::Text(const std::string &text, int x, int y,
sbImage->decRef();
}
++mInstances;
- mHeight = boldFont->getHeight();
- mWidth = boldFont->getWidth(text);
+ mHeight = mFont->getHeight();
+ mWidth = mFont->getWidth(text);
switch (alignment)
{
@@ -121,8 +122,6 @@ void Text::adviseXY(int x, int y)
void Text::draw(gcn::Graphics *graphics, int xOff, int yOff)
{
- graphics->setFont(boldFont);
-
if (mIsSpeech) {
static_cast<Graphics*>(graphics)->drawImageRect(
mX - xOff - 5, mY - yOff - 5, mWidth + 10, mHeight + 10,
@@ -138,7 +137,7 @@ void Text::draw(gcn::Graphics *graphics, int xOff, int yOff)
TextRenderer::renderText(graphics, mText,
mX - xOff, mY - yOff, gcn::Graphics::LEFT,
- *mColor, boldFont, !mIsSpeech, true);
+ *mColor, mFont, !mIsSpeech, true);
}
FlashText::FlashText(const std::string &text, int x, int y,