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 | |
parent | e6c1af6d47aa79f02e0bf20ade42158511f25c69 (diff) | |
parent | cba524cbd0641cdf9e2e19eda453ab7518d8dca0 (diff) | |
download | mana-b5e8d34910b4595b40f1210fbdd06a3a0bd9b7b7.tar.gz mana-b5e8d34910b4595b40f1210fbdd06a3a0bd9b7b7.tar.bz2 mana-b5e8d34910b4595b40f1210fbdd06a3a0bd9b7b7.tar.xz mana-b5e8d34910b4595b40f1210fbdd06a3a0bd9b7b7.zip |
Merge branch 'master' of git@gitorious.org:tmw/mainline
-rw-r--r-- | src/being.cpp | 4 | ||||
-rw-r--r-- | src/gui/partywindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/setup_video.cpp | 6 | ||||
-rw-r--r-- | src/text.cpp | 9 | ||||
-rw-r--r-- | src/text.h | 1 |
5 files changed, 11 insertions, 11 deletions
diff --git a/src/being.cpp b/src/being.cpp index 4c4706db..2b31e9ec 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -396,7 +396,7 @@ void Being::setSpeech(const std::string &text, int time) if (!mSpeech.empty()) mSpeechTime = time <= SPEECH_MAX_TIME ? time : SPEECH_MAX_TIME; - const int speech = (int) config.getValue("speech", NAME_IN_BUBBLE); + const int speech = (int) config.getValue("speech", TEXT_OVERHEAD); if (speech == TEXT_OVERHEAD) { if (mText) @@ -776,7 +776,7 @@ void Being::drawSpeech(int offsetX, int offsetY) { const int px = mPx - offsetX; const int py = mPy - offsetY; - const int speech = (int) config.getValue("speech", NAME_IN_BUBBLE); + const int speech = (int) config.getValue("speech", TEXT_OVERHEAD); // Draw speech above this being if (mSpeechTime == 0) diff --git a/src/gui/partywindow.cpp b/src/gui/partywindow.cpp index 0479f0fe..dbd8f3ef 100644 --- a/src/gui/partywindow.cpp +++ b/src/gui/partywindow.cpp @@ -51,7 +51,7 @@ PartyWindow::PartyWindow() : setCloseButton(true); setMinWidth(200); setMinHeight(200); - setDefaultSize(620, 300, 200, 200); + setDefaultSize(590, 200, 200, 200); loadWindowState(); setVisible(false); // Do not start out visible diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp index 8aa5c9fd..bbbeb6d7 100644 --- a/src/gui/setup_video.cpp +++ b/src/gui/setup_video.cpp @@ -100,7 +100,7 @@ ModeListModel::ModeListModel() for (int i = 0; modes[i]; ++i) { const std::string modeString = - toString((int)modes[i]->w) + "x" + toString((int)modes[i]->h); + toString((int)modes[i]->w) + "x" + toString((int) modes[i]->h); //logger->log(modeString.c_str()); mVideoModes.push_back(modeString); } @@ -145,7 +145,7 @@ Setup_Video::Setup_Video(): mPickupParticleEnabled(config.getValue("showpickupparticle", false)), mOpacity(config.getValue("guialpha", 0.8)), mFps((int) config.getValue("fpslimit", 60)), - mSpeechMode((int) config.getValue("speech", 3)), + mSpeechMode((int) config.getValue("speech", Being::TEXT_OVERHEAD)), mModeListModel(new ModeListModel), mModeList(new ListBox(mModeListModel)), mFsCheckBox(new CheckBox(_("Full screen"), mFullScreenEnabled)), @@ -446,7 +446,7 @@ void Setup_Video::apply() mVisibleNamesEnabled = config.getValue("visiblenames", true); mParticleEffectsEnabled = config.getValue("particleeffects", true); mNameEnabled = config.getValue("showownname", false); - mSpeechMode = (int) config.getValue("speech", 3); + mSpeechMode = (int) config.getValue("speech", Being::TEXT_OVERHEAD); mOpacity = config.getValue("guialpha", 0.8); mOverlayDetail = (int) config.getValue("OverlayDetail", 2); mOpenGLEnabled = config.getValue("opengl", false); 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, @@ -71,6 +71,7 @@ class Text static int mInstances; /**< Instances of text. */ std::string mText; /**< The text to display. */ const gcn::Color *mColor; /**< The color of the text. */ + gcn::Font *mFont; /**< The font of the text */ bool mIsSpeech; /**< Is this text a speech bubble? */ protected: |