diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-05-18 21:53:13 +0200 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-05-18 21:53:13 +0200 |
commit | 06ee3ce2a54d5bb481e27f9d61be75b7f9d0fa45 (patch) | |
tree | 11e982ad936a6e388360acc116558eaad27226ce /src/gui | |
parent | 38a4f3b3c4bef27496f88c6e8e6a32d978c29400 (diff) | |
parent | 8766348bdc55e6aea795cbb765fadea08a70476c (diff) | |
download | mana-client-06ee3ce2a54d5bb481e27f9d61be75b7f9d0fa45.tar.gz mana-client-06ee3ce2a54d5bb481e27f9d61be75b7f9d0fa45.tar.bz2 mana-client-06ee3ce2a54d5bb481e27f9d61be75b7f9d0fa45.tar.xz mana-client-06ee3ce2a54d5bb481e27f9d61be75b7f9d0fa45.zip |
Merge branch '0.0.29'
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/progressbar.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp index 58f24651..c673ffb3 100644 --- a/src/gui/widgets/progressbar.cpp +++ b/src/gui/widgets/progressbar.cpp @@ -31,6 +31,8 @@ #include "resources/image.h" #include "resources/resourcemanager.h" +#include "utils/dtor.h" + #include <guichan/font.hpp> ImageRect ProgressBar::mBorder; @@ -59,7 +61,7 @@ ProgressBar::ProgressBar(float progress, mBorder.grid[1] = dBorders->getSubImage(4, 0, 3, 4); mBorder.grid[2] = dBorders->getSubImage(7, 0, 4, 4); mBorder.grid[3] = dBorders->getSubImage(0, 4, 4, 10); - mBorder.grid[4] = resman->getImage("graphics/gui/bg_quad_dis.png"); + mBorder.grid[4] = dBorders->getSubImage(4, 4, 3, 10); mBorder.grid[5] = dBorders->getSubImage(7, 4, 4, 10); mBorder.grid[6] = dBorders->getSubImage(0, 15, 4, 4); mBorder.grid[7] = dBorders->getSubImage(4, 15, 3, 4); @@ -82,15 +84,7 @@ ProgressBar::~ProgressBar() if (mInstances == 0) { - delete mBorder.grid[0]; - delete mBorder.grid[1]; - delete mBorder.grid[2]; - delete mBorder.grid[3]; - mBorder.grid[4]->decRef(); - delete mBorder.grid[5]; - delete mBorder.grid[6]; - delete mBorder.grid[7]; - delete mBorder.grid[8]; + for_each(mBorder.grid, mBorder.grid + 9, dtor<Image*>()); } } |