summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp19
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);
}
}