summaryrefslogtreecommitdiff
path: root/src/gui/playerbox.cpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-10-20 14:26:45 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-10-20 14:26:45 +0000
commitc49b55c2963486930248729f7f6ba9a3d7d2cf8c (patch)
tree04c6ca99abd429aba89c6904f1d00be7d516855f /src/gui/playerbox.cpp
parent30165a4d80ffcfd22f9977fa52ce87d4e87249a2 (diff)
downloadmana-client-c49b55c2963486930248729f7f6ba9a3d7d2cf8c.tar.gz
mana-client-c49b55c2963486930248729f7f6ba9a3d7d2cf8c.tar.bz2
mana-client-c49b55c2963486930248729f7f6ba9a3d7d2cf8c.tar.xz
mana-client-c49b55c2963486930248729f7f6ba9a3d7d2cf8c.zip
Centered sprite inside selection box.
Diffstat (limited to 'src/gui/playerbox.cpp')
-rw-r--r--src/gui/playerbox.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/playerbox.cpp b/src/gui/playerbox.cpp
index 95366bee..e3f5b540 100644
--- a/src/gui/playerbox.cpp
+++ b/src/gui/playerbox.cpp
@@ -80,7 +80,11 @@ PlayerBox::draw(gcn::Graphics *graphics)
if (mPlayer)
{
// Draw character
- mPlayer->draw(static_cast<Graphics*>(graphics), 40, 42);
+ int x, y, bs;
+ bs = getBorderSize();
+ x = getWidth() / 2 - 16 + bs;
+ y = getHeight() / 2 + bs;
+ mPlayer->draw(static_cast<Graphics*>(graphics), x, y);
}
}