summaryrefslogtreecommitdiff
path: root/src/gui/widgets/windowcontainer.cpp
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/widgets/windowcontainer.cpp
parentcf383ed98ff41b6086325b168e5f750b6f87d72e (diff)
downloadManaVerse-74f89c500d278b6ac668c313b63d0f1e76f4acaf.tar.gz
ManaVerse-74f89c500d278b6ac668c313b63d0f1e76f4acaf.tar.bz2
ManaVerse-74f89c500d278b6ac668c313b63d0f1e76f4acaf.tar.xz
ManaVerse-74f89c500d278b6ac668c313b63d0f1e76f4acaf.zip
fix overhead text popups order. Now it drawed always below any windows.
Diffstat (limited to 'src/gui/widgets/windowcontainer.cpp')
-rw-r--r--src/gui/widgets/windowcontainer.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gui/widgets/windowcontainer.cpp b/src/gui/widgets/windowcontainer.cpp
index cba565cc4..d420e1183 100644
--- a/src/gui/widgets/windowcontainer.cpp
+++ b/src/gui/widgets/windowcontainer.cpp
@@ -58,6 +58,26 @@ void WindowContainer::adjustAfterResize(const int oldScreenWidth,
}
}
+void WindowContainer::moveWidgetAfter(gcn::Widget *const after,
+ gcn::Widget *const widget)
+{
+ WidgetListIterator widgetIter = std::find(
+ mWidgets.begin(), mWidgets.end(), widget);
+
+ if (widgetIter == mWidgets.end())
+ return;
+
+ WidgetListIterator afterIter = std::find(
+ mWidgets.begin(), mWidgets.end(), after);
+
+ if (afterIter == mWidgets.end())
+ return;
+
+ ++ afterIter;
+ mWidgets.erase(widgetIter);
+ mWidgets.insert(afterIter, widget);
+}
+
#ifdef USE_PROFILER
void WindowContainer::draw(gcn::Graphics* graphics)
{