summaryrefslogtreecommitdiff
path: root/src/gui/playerbox.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-16 22:35:06 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-16 22:35:06 +0000
commit12356c8b5b7002cdffaa6a737f54806f52241bfb (patch)
tree8c2f46d37296420839b5cb3b9a231b5af94b31e5 /src/gui/playerbox.cpp
parentc6ee43355e49e4099fdb2e1b26bf29eddcee130a (diff)
downloadmana-12356c8b5b7002cdffaa6a737f54806f52241bfb.tar.gz
mana-12356c8b5b7002cdffaa6a737f54806f52241bfb.tar.bz2
mana-12356c8b5b7002cdffaa6a737f54806f52241bfb.tar.xz
mana-12356c8b5b7002cdffaa6a737f54806f52241bfb.zip
Removed datafile and configfile and any leftover old GUI drawing code.
Diffstat (limited to 'src/gui/playerbox.cpp')
-rw-r--r--src/gui/playerbox.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/gui/playerbox.cpp b/src/gui/playerbox.cpp
index 67d0e9e3..9efb9bad 100644
--- a/src/gui/playerbox.cpp
+++ b/src/gui/playerbox.cpp
@@ -31,6 +31,23 @@ PlayerBox::PlayerBox():
showPlayer(false)
{
setBorderSize(2);
+
+ // Load the background skin
+ ResourceManager *resman = ResourceManager::getInstance();
+ Image *textbox = resman->getImage("core/graphics/gui/textbox.bmp");
+ int bggridx[4] = {0, 9, 16, 25};
+ int bggridy[4] = {0, 4, 19, 24};
+ int a = 0, x, y;
+
+ for (y = 0; y < 3; y++) {
+ for (x = 0; x < 3; x++) {
+ background.grid[a] = textbox->getSubImage(
+ bggridx[x], bggridy[y],
+ bggridx[x + 1] - bggridx[x] + 1,
+ bggridy[y + 1] - bggridy[y] + 1);
+ a++;
+ }
+ }
}
void PlayerBox::draw(gcn::Graphics *graphics)
@@ -61,5 +78,5 @@ void PlayerBox::drawBorder(gcn::Graphics *graphics)
x -= bs;
y -= bs;
- draw_skinned_rect(buffer, &gui_skin.textbox.bg, x, y, w, h);
+ ((Graphics*)graphics)->drawImageRect(x, y, w, h, background);
}