summaryrefslogtreecommitdiff
path: root/src/player.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-03-04 22:41:19 -0700
committerJared Adams <jaxad0127@gmail.com>2010-03-12 14:49:27 -0700
commit781b3c9f17708cc5fe08eb3c9ee38d596364d97c (patch)
tree833797c9b9168ab58864ffe4cf8ed028060e44a2 /src/player.cpp
parent96b64757954f07d196599b3c1131a6603982c930 (diff)
downloadmana-781b3c9f17708cc5fe08eb3c9ee38d596364d97c.tar.gz
mana-781b3c9f17708cc5fe08eb3c9ee38d596364d97c.tar.bz2
mana-781b3c9f17708cc5fe08eb3c9ee38d596364d97c.tar.xz
mana-781b3c9f17708cc5fe08eb3c9ee38d596364d97c.zip
Split Palette into Theme and UserPalette
Themes can now control the colors they use. Colors in the Viewport (being names, particles, etc) can still be changed by the user. Also make ProgressBars more easily colored. DyePalette was made more flexible in the process. Also fixes comparing strings of different lengths insensitively. Reviewed-by: Thorbjørn Lindeijer
Diffstat (limited to 'src/player.cpp')
-rw-r--r--src/player.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/player.cpp b/src/player.cpp
index 4fc5d523..dfe45e6c 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -30,8 +30,9 @@
#include "party.h"
#include "text.h"
-#include "gui/palette.h"
#include "gui/socialwindow.h"
+#include "gui/theme.h"
+#include "gui/userpalette.h"
#include "net/charhandler.h"
#include "net/net.h"
@@ -327,20 +328,20 @@ void Player::optionChanged(const std::string &value)
void Player::updateColors()
{
- mTextColor = &guiPalette->getColor(Palette::PLAYER);
+ mTextColor = &userPalette->getColor(Theme::PLAYER);
if (mIsGM)
{
- mTextColor = &guiPalette->getColor(Palette::GM);
- mNameColor = &guiPalette->getColor(Palette::GM_NAME);
+ mTextColor = &userPalette->getColor(Theme::GM);
+ mNameColor = &userPalette->getColor(UserPalette::GM);
}
else if (mParty && mParty == player_node->getParty())
{
- mNameColor = &guiPalette->getColor(Palette::PARTY);
+ mNameColor = &userPalette->getColor(UserPalette::PARTY);
}
else
{
- mNameColor = &guiPalette->getColor(Palette::PC);
+ mNameColor = &userPalette->getColor(UserPalette::PC);
}
if (mDispName)