summaryrefslogtreecommitdiff
path: root/src/player.cpp
diff options
context:
space:
mode:
authorLloyd Bryant <lloyd_bryant@netzero.net>2008-08-13 15:02:59 +0000
committerLloyd Bryant <lloyd_bryant@netzero.net>2008-08-13 15:02:59 +0000
commit94024e2b57b31ee92bb81fc48ce236283330b60c (patch)
treea526015cfcdd33c3482b710dc4fa22bbec4e0090 /src/player.cpp
parentc9175a4d140f4c852aa5195b72ad9bd1ae8d5cee (diff)
downloadmana-94024e2b57b31ee92bb81fc48ce236283330b60c.tar.gz
mana-94024e2b57b31ee92bb81fc48ce236283330b60c.tar.bz2
mana-94024e2b57b31ee92bb81fc48ce236283330b60c.tar.xz
mana-94024e2b57b31ee92bb81fc48ce236283330b60c.zip
Added support for different colored fonts for different being types
Diffstat (limited to 'src/player.cpp')
-rw-r--r--src/player.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/player.cpp b/src/player.cpp
index 5db009ba..0740c7db 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -43,6 +43,7 @@ Player::Player(int id, int job, Map *map):
Being(id, job, map)
{
mName = 0;
+ mIsGM = false;
}
Player::~Player()
@@ -57,9 +58,15 @@ void Player::setName(const std::string &name)
{
if (mName == 0)
{
- mName = new FlashText(name, mPx + NAME_X_OFFSET, mPy + NAME_Y_OFFSET,
- gcn::Graphics::CENTER,
- speechFont, gcn::Color(255, 255, 255));
+ if (mIsGM) {
+ mName = new FlashText("(GM) " + name, mPx + NAME_X_OFFSET, mPy + NAME_Y_OFFSET,
+ gcn::Graphics::CENTER,
+ gmNameFont, gcn::Color(255, 255, 255));
+ } else {
+ mName = new FlashText(name, mPx + NAME_X_OFFSET, mPy + NAME_Y_OFFSET,
+ gcn::Graphics::CENTER,
+ speechFont, gcn::Color(255, 255, 255));
+ }
Being::setName(name);
}
}