summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--src/gui/playerbox.cpp6
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7d93294f..a6d41da7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
container. Fixed dangling resize widget. Added layout handler.
* src/gui/login.cpp: Fixed layout of login dialog box when native
language is not English.
+ * src/gui/playerbox.cpp: Centered sprite inside selection box.
2007-10-19 Guillaume Melquiond <guillaume.melquiond@gmail.com>
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);
}
}