summaryrefslogtreecommitdiff
path: root/src/gui/popups
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-30 13:17:52 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-30 13:17:52 +0300
commit74f89c500d278b6ac668c313b63d0f1e76f4acaf (patch)
treefe401dc562916edfaae0c060b661ccb383be9722 /src/gui/popups
parentcf383ed98ff41b6086325b168e5f750b6f87d72e (diff)
downloadmv-74f89c500d278b6ac668c313b63d0f1e76f4acaf.tar.gz
mv-74f89c500d278b6ac668c313b63d0f1e76f4acaf.tar.bz2
mv-74f89c500d278b6ac668c313b63d0f1e76f4acaf.tar.xz
mv-74f89c500d278b6ac668c313b63d0f1e76f4acaf.zip
fix overhead text popups order. Now it drawed always below any windows.
Diffstat (limited to 'src/gui/popups')
-rw-r--r--src/gui/popups/speechbubble.cpp7
-rw-r--r--src/gui/popups/speechbubble.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/popups/speechbubble.cpp b/src/gui/popups/speechbubble.cpp
index 0c40676f6..f1c7c0b9c 100644
--- a/src/gui/popups/speechbubble.cpp
+++ b/src/gui/popups/speechbubble.cpp
@@ -24,10 +24,12 @@
#include "gui/popups/speechbubble.h"
#include "gui/sdlfont.h"
+#include "gui/viewport.h"
#include "gui/widgets/browserbox.h"
#include "gui/widgets/label.h"
#include "gui/widgets/textbox.h"
+#include "gui/widgets/windowcontainer.h"
#include <guichan/font.hpp>
@@ -89,3 +91,8 @@ void SpeechBubble::setText(const std::string &text, const bool showName)
mCaption->setPosition(0, 0);
mSpeechBox->setPosition(0, nameHeight);
}
+
+void SpeechBubble::requestMoveToBackground()
+{
+ windowContainer->moveWidgetAfter(viewport, this);
+}
diff --git a/src/gui/popups/speechbubble.h b/src/gui/popups/speechbubble.h
index 41c210eab..153c1e954 100644
--- a/src/gui/popups/speechbubble.h
+++ b/src/gui/popups/speechbubble.h
@@ -57,6 +57,8 @@ class SpeechBubble final : public Popup
*/
void setText(const std::string &text, const bool showName = true);
+ void requestMoveToBackground();
+
private:
std::string mText;
int mSpacing;