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/localplayer.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/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index d6acc48f..f72aa59a 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -37,6 +37,7 @@ #include "text.h" #include "gui/gui.h" +#include "gui/palette.h" #include "gui/storagewindow.h" #include "net/messageout.h" @@ -201,7 +202,9 @@ void LocalPlayer::logic() void LocalPlayer::setGM() { mIsGM = !mIsGM; - mNameColor = mIsGM ? 0x009000: 0x202020; + mNameColor = mIsGM ? + &guiPalette->getColor(Palette::GM) : + &guiPalette->getColor(Palette::PLAYER); setName(getName()); config.setValue(getName() + "GMassert", mIsGM); } @@ -608,10 +611,9 @@ void LocalPlayer::setXp(int xp) const std::string text = toString(xp - mXp) + " xp"; // Show XP number - particleEngine->addTextRiseFadeOutEffect(text, - gui->getInfoParticleFont(), - mPx + 16, mPy - 16, - 255, 255, 0, true); + particleEngine->addTextRiseFadeOutEffect(text, mPx + 16, mPy - 16, + &guiPalette->getColor(Palette::EXP_INFO), + gui->getInfoParticleFont(), true); } mXp = xp; } @@ -621,10 +623,9 @@ void LocalPlayer::pickedUp(std::string item) if (mMap) { // Show pickup notification - particleEngine->addTextRiseFadeOutEffect(item, - gui->getInfoParticleFont (), - mPx + 16, mPy - 16, - 40, 220, 40, true); + particleEngine->addTextRiseFadeOutEffect(item, mPx + 16, mPy - 16, + &guiPalette->getColor(Palette::PICKUP_INFO), + gui->getInfoParticleFont (), true); } } |