diff options
author | Majin Sniper <majinsniper@gmx.de> | 2009-03-12 22:42:42 +0100 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-03-12 19:38:55 -0600 |
commit | 3b1fbbe072e4da86be4c8f8f22655d04565379d2 (patch) | |
tree | 9bae46138230c01fd2998395e146556f9a9db05b /src/localplayer.cpp | |
parent | b9191530c81595b0ad3d2faa6c4d21d75a720c29 (diff) | |
download | mana-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/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 296bc28c..30ff9c35 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -38,6 +38,7 @@ #include "gui/gui.h" #include "gui/ministatus.h" +#include "gui/palette.h" #include "gui/storagewindow.h" #include "net/messageout.h" @@ -212,7 +213,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); } @@ -614,10 +617,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; } @@ -627,10 +629,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); } } |