summaryrefslogtreecommitdiff
path: root/src/gui/widgets/container.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-07-31 20:05:33 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-08-01 23:05:45 +0200
commita61c57070aa618ac749e4a90a2b83c0e3a15e5fd (patch)
tree797bf52349e73aaeb2d46e421e8a798478deecb7 /src/gui/widgets/container.cpp
parent9dd1d4339fd186927b35b64024ee88ba615f2a25 (diff)
downloadmana-client-a61c57070aa618ac749e4a90a2b83c0e3a15e5fd.tar.gz
mana-client-a61c57070aa618ac749e4a90a2b83c0e3a15e5fd.tar.bz2
mana-client-a61c57070aa618ac749e4a90a2b83c0e3a15e5fd.tar.xz
mana-client-a61c57070aa618ac749e4a90a2b83c0e3a15e5fd.zip
Some positioning changes in the game UI
Moved player status bars to the top-right, next to the window menu. Used the layout for dynamic adjustments to screen resolution.
Diffstat (limited to 'src/gui/widgets/container.cpp')
-rw-r--r--src/gui/widgets/container.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/widgets/container.cpp b/src/gui/widgets/container.cpp
index e1b99af7..a2b3ee78 100644
--- a/src/gui/widgets/container.cpp
+++ b/src/gui/widgets/container.cpp
@@ -54,3 +54,11 @@ ContainerPlacer Container::getPlacer(int x, int y)
{
return ContainerPlacer(this, &getLayout().at(x, y));
}
+
+void Container::updateLayout()
+{
+ const gcn::Rectangle area = getChildrenArea();
+ int w = area.width;
+ int h = area.height;
+ getLayout().reflow(w, h);
+}