diff options
author | Majin Sniper <majinsniper@gmx.de> | 2009-03-12 22:42:42 +0100 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-03-12 21:53:00 -0600 |
commit | f0d5e3da15a308fcc962590330e7d8e39e8874b9 (patch) | |
tree | a0e7f61b1f6a2f2aee20549c9ac55a123ba3ccba /src/player.cpp | |
parent | 5207b4cbb462cfa962a6f566897a6affd92eef94 (diff) | |
download | mana-f0d5e3da15a308fcc962590330e7d8e39e8874b9.tar.gz mana-f0d5e3da15a308fcc962590330e7d8e39e8874b9.tar.bz2 mana-f0d5e3da15a308fcc962590330e7d8e39e8874b9.tar.xz mana-f0d5e3da15a308fcc962590330e7d8e39e8874b9.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.cpp | 13 |
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); } |