summaryrefslogtreecommitdiff
path: root/src/gui/speechbubble.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2008-10-12 06:39:34 +0000
committerIra Rice <irarice@gmail.com>2008-10-12 06:39:34 +0000
commit9f5f8e5c6579f3ecc7a6c245e063d5f2d96c62ff (patch)
tree5d6ff477702930af474e2e49f860b47c7f8505fb /src/gui/speechbubble.cpp
parentd5736cdc5700994520a53fdd560fd7ea946f6e63 (diff)
downloadmana-client-9f5f8e5c6579f3ecc7a6c245e063d5f2d96c62ff.tar.gz
mana-client-9f5f8e5c6579f3ecc7a6c245e063d5f2d96c62ff.tar.bz2
mana-client-9f5f8e5c6579f3ecc7a6c245e063d5f2d96c62ff.tar.xz
mana-client-9f5f8e5c6579f3ecc7a6c245e063d5f2d96c62ff.zip
This commit contains three things: one, after looking over how TMW was
handling the effects through the level up system, I determined that it wasn't bad, so I pulled it from TMW's SVN. Two, I edited the web page css so that it better matches the forum. And three, I patched text wrapping so that it'll fix up its display size based on all previous lines, except for the last line. That fix will come later, but for now, it'll be seen as a special case. While you'd like to think that just resending the string and starting the function over again would fix it, you'd be wrong. So it won't be patched until I think of a better way to handle that case.
Diffstat (limited to 'src/gui/speechbubble.cpp')
-rw-r--r--src/gui/speechbubble.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/speechbubble.cpp b/src/gui/speechbubble.cpp
index c5c653e7..0ccbebc0 100644
--- a/src/gui/speechbubble.cpp
+++ b/src/gui/speechbubble.cpp
@@ -59,8 +59,13 @@ SpeechBubble::SpeechBubble()//:
mSpeechBox->setTextWrapped( "" );
}
-void SpeechBubble::setText(const std::string mText)
+void SpeechBubble::setText(std::string mText)
{
+ while (mText[0] == ' ')
+ {
+ mText = mText.substr(1, mText.size());
+ }
+
mSpeechBox->setMinWidth(140);
mSpeechBox->setTextWrapped( mText );