summaryrefslogtreecommitdiff
path: root/src/gui/hbox.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-10-18 21:40:25 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-10-18 21:40:25 +0000
commitaa6a0b7b75bc05e51805b6f377ca6278f1f58436 (patch)
tree718c211089348a3b67641d16821a98ae88de0285 /src/gui/hbox.cpp
parentd0333c99e0ff4c5510875bf8993056875d6c93af (diff)
downloadmana-aa6a0b7b75bc05e51805b6f377ca6278f1f58436.tar.gz
mana-aa6a0b7b75bc05e51805b6f377ca6278f1f58436.tar.bz2
mana-aa6a0b7b75bc05e51805b6f377ca6278f1f58436.tar.xz
mana-aa6a0b7b75bc05e51805b6f377ca6278f1f58436.zip
Added automatic widget cleanup to the window class.
Diffstat (limited to 'src/gui/hbox.cpp')
-rw-r--r--src/gui/hbox.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/gui/hbox.cpp b/src/gui/hbox.cpp
index 0192eb67..69564fbb 100644
--- a/src/gui/hbox.cpp
+++ b/src/gui/hbox.cpp
@@ -23,26 +23,17 @@
#include "hbox.h"
-HBox::HBox()
- : Box()
-{
-}
-
-HBox::~HBox()
-{
-}
-
void HBox::draw(gcn::Graphics *graphics)
{
int widgetCount = mWidgets.size();
int childHeight = getHeight();
if (widgetCount == 0)
- return;
+ return;
int childWidth = getWidth() / widgetCount;
int i = 0;
for (WidgetIterator w = mWidgets.begin(); w != mWidgets.end(); w++) {
- (*w)->setPosition(childWidth * i - padding, 0);
+ (*w)->setPosition(childWidth * i - padding, 0);
(*w)->setSize(childWidth, childHeight);
i++;
}