summaryrefslogtreecommitdiff
path: root/src/player.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/player.cpp')
-rw-r--r--src/player.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/player.cpp b/src/player.cpp
index 61e91613..b289c3e5 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -22,10 +22,13 @@
#include "animatedsprite.h"
#include "game.h"
+#include "localplayer.h"
#include "particle.h"
#include "player.h"
#include "text.h"
+#include "gui/palette.h"
+
#include "resources/colordb.h"
#include "resources/itemdb.h"
@@ -51,17 +54,19 @@ void Player::setName(const std::string &name)
{
if (mIsGM)
{
- mNameColor = 0x009000;
+ mNameColor = &guiPalette->getColor(Palette::GM);
mName = new FlashText("(GM) " + name, mPx + NAME_X_OFFSET, mPy +
NAME_Y_OFFSET, gcn::Graphics::CENTER,
- gcn::Color(0, 255, 0));
+ &guiPalette->getColor(Palette::GM));
}
else
{
- mNameColor = 0x202020;
+ mNameColor = &guiPalette->getColor(Palette::PLAYER);
mName = new FlashText(name, mPx + NAME_X_OFFSET, mPy + NAME_Y_OFFSET,
gcn::Graphics::CENTER,
- gcn::Color(255, 255, 255));
+ (this == player_node) ?
+ &guiPalette->getColor(Palette::SELF) :
+ &guiPalette->getColor(Palette::PC));
}
Being::setName(name);
}