diff options
author | peavey <peavey@inspircd.org> | 2009-05-10 22:27:24 +0200 |
---|---|---|
committer | peavey <peavey@inspircd.org> | 2009-05-10 22:27:24 +0200 |
commit | b5e8d34910b4595b40f1210fbdd06a3a0bd9b7b7 (patch) | |
tree | c3d1f373528e4de0f35f4c9021c60f8805fd3545 /src/text.cpp | |
parent | e6c1af6d47aa79f02e0bf20ade42158511f25c69 (diff) | |
parent | cba524cbd0641cdf9e2e19eda453ab7518d8dca0 (diff) | |
download | mana-client-b5e8d34910b4595b40f1210fbdd06a3a0bd9b7b7.tar.gz mana-client-b5e8d34910b4595b40f1210fbdd06a3a0bd9b7b7.tar.bz2 mana-client-b5e8d34910b4595b40f1210fbdd06a3a0bd9b7b7.tar.xz mana-client-b5e8d34910b4595b40f1210fbdd06a3a0bd9b7b7.zip |
Merge branch 'master' of git@gitorious.org:tmw/mainline
Diffstat (limited to 'src/text.cpp')
-rw-r--r-- | src/text.cpp | 9 |
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, |