summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-08 23:05:26 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-13 01:02:41 +0300
commit2694837a25941c737236b68dff23aafa76954c8a (patch)
tree927b0d51cd04b64c4fd6c9d009d7a18804356237 /src/gui
parent36b586e32474e0d21de2383aa106869cfef89902 (diff)
downloadManaVerse-2694837a25941c737236b68dff23aafa76954c8a.tar.gz
ManaVerse-2694837a25941c737236b68dff23aafa76954c8a.tar.bz2
ManaVerse-2694837a25941c737236b68dff23aafa76954c8a.tar.xz
ManaVerse-2694837a25941c737236b68dff23aafa76954c8a.zip
Change playerbox theming.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/playerbox.cpp33
1 files changed, 3 insertions, 30 deletions
diff --git a/src/gui/widgets/playerbox.cpp b/src/gui/widgets/playerbox.cpp
index 90a9c9409..d505aa27e 100644
--- a/src/gui/widgets/playerbox.cpp
+++ b/src/gui/widgets/playerbox.cpp
@@ -47,35 +47,11 @@ PlayerBox::PlayerBox(Being *being):
if (instances == 0)
{
- // Load the background skin
- Image *textbox = Theme::getImageFromTheme("deepbox.png");
- int bggridx[4] = {0, 3, 28, 31};
- int bggridy[4] = {0, 3, 28, 31};
- int a = 0, x, y;
-
- for (y = 0; y < 3; y++)
+ if (Theme::instance())
{
- for (x = 0; x < 3; x++)
- {
- if (textbox)
- {
- background.grid[a] = textbox->getSubImage(
- bggridx[x], bggridy[y],
- bggridx[x + 1] - bggridx[x] + 1,
- bggridy[y + 1] - bggridy[y] + 1);
- if (background.grid[a])
- background.grid[a]->setAlpha(Client::getGuiAlpha());
- }
- else
- {
- background.grid[a] = nullptr;
- }
- a++;
- }
+ Theme::instance()->loadRect(background,
+ "playerbox_background.xml");
}
-
- if (textbox)
- textbox->decRef();
}
instances++;
@@ -86,9 +62,6 @@ PlayerBox::~PlayerBox()
instances--;
mBeing = nullptr;
-
- if (instances == 0)
- for_each(background.grid, background.grid + 9, dtor<Image*>());
}
void PlayerBox::draw(gcn::Graphics *graphics)