summaryrefslogtreecommitdiff
path: root/src/gui/vbox.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-08-13 10:20:19 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-08-13 10:20:19 +0000
commitd3385829ca6f7d52e21706b25b14fe1083cfe984 (patch)
treeaea368b2434a49864b33183f95b6aae36abef3b7 /src/gui/vbox.cpp
parent7d287027babe615e01ddcf20edc1057f7d778c58 (diff)
downloadmana-d3385829ca6f7d52e21706b25b14fe1083cfe984.tar.gz
mana-d3385829ca6f7d52e21706b25b14fe1083cfe984.tar.bz2
mana-d3385829ca6f7d52e21706b25b14fe1083cfe984.tar.xz
mana-d3385829ca6f7d52e21706b25b14fe1083cfe984.zip
Merged Guichan 0.5.0 support from guichan-0.5.0 branch, plus several updates
from the 0.1.0 branch.
Diffstat (limited to 'src/gui/vbox.cpp')
-rw-r--r--src/gui/vbox.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/gui/vbox.cpp b/src/gui/vbox.cpp
index d79fbba2..eb838ead 100644
--- a/src/gui/vbox.cpp
+++ b/src/gui/vbox.cpp
@@ -25,17 +25,21 @@
void VBox::draw(gcn::Graphics *graphics)
{
- int widgetCount = mWidgets.size();
- int childWidth = getWidth();
- if (widgetCount == 0)
- return;
- int childHeight = getHeight() / widgetCount;
+ if (mWidgets.size() == 0)
+ {
+ return;
+ }
+ int childWidth = getWidth();
+ int childHeight = getHeight() / mWidgets.size();
int i = 0;
- for (WidgetIterator w = mWidgets.begin(); w != mWidgets.end(); w++) {
- (*w)->setPosition(0, childHeight * i - padding);
+
+ for (WidgetIterator w = mWidgets.begin(); w != mWidgets.end(); w++)
+ {
+ (*w)->setPosition(0, childHeight * i - padding);
(*w)->setSize(childWidth, childHeight);
i++;
}
+
gcn::Container::draw(graphics);
}