diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-07-30 14:33:28 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-07-30 14:33:28 +0000 |
commit | aff167beefadc32add4b44626cc2f1cbef800c7b (patch) | |
tree | 43796105cc107ec55742e88562e064d8031d3b23 /src/gui/vbox.cpp | |
parent | 18b73fdadd715d356416a95c31a25b3293fa2596 (diff) | |
download | mana-aff167beefadc32add4b44626cc2f1cbef800c7b.tar.gz mana-aff167beefadc32add4b44626cc2f1cbef800c7b.tar.bz2 mana-aff167beefadc32add4b44626cc2f1cbef800c7b.tar.xz mana-aff167beefadc32add4b44626cc2f1cbef800c7b.zip |
Updated TMW to be compatible with Guichan 0.5.0 (merged from guichan-0.5.0
branch).
Diffstat (limited to 'src/gui/vbox.cpp')
-rw-r--r-- | src/gui/vbox.cpp | 18 |
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); } |