summaryrefslogtreecommitdiff
path: root/src/player.cpp
diff options
context:
space:
mode:
authorMajin Sniper <majinsniper@gmx.de>2009-03-12 22:42:42 +0100
committerJared Adams <jaxad0127@gmail.com>2009-03-12 19:38:55 -0600
commit3b1fbbe072e4da86be4c8f8f22655d04565379d2 (patch)
tree9bae46138230c01fd2998395e146556f9a9db05b /src/player.cpp
parentb9191530c81595b0ad3d2faa6c4d21d75a720c29 (diff)
downloadmana-3b1fbbe072e4da86be4c8f8f22655d04565379d2.tar.gz
mana-3b1fbbe072e4da86be4c8f8f22655d04565379d2.tar.bz2
mana-3b1fbbe072e4da86be4c8f8f22655d04565379d2.tar.xz
mana-3b1fbbe072e4da86be4c8f8f22655d04565379d2.zip
Make use of the new available colors
This patch lets all being derivatives use the palette to set their name's colors. Text Particle Effects all respect the new settings. Some widgets were updated to use the colors.
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 e1928280..8668ac58 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -21,10 +21,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"
@@ -50,17 +53,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);
}