diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-03-04 22:41:19 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-03-12 14:49:27 -0700 |
commit | 781b3c9f17708cc5fe08eb3c9ee38d596364d97c (patch) | |
tree | 833797c9b9168ab58864ffe4cf8ed028060e44a2 /src/localplayer.cpp | |
parent | 96b64757954f07d196599b3c1131a6603982c930 (diff) | |
download | mana-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/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index a48c7f4c..dfee7cdc 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -41,11 +41,11 @@ #include "gui/gui.h" #include "gui/ministatus.h" -#include "gui/palette.h" #include "gui/skilldialog.h" #include "gui/statuswindow.h" #include "gui/storagewindow.h" #include "gui/theme.h" +#include "gui/userpalette.h" #include "gui/widgets/chattab.h" @@ -105,8 +105,8 @@ LocalPlayer::LocalPlayer(int id, int job): { mUpdateName = true; - mTextColor = &guiPalette->getColor(Palette::PLAYER); - mNameColor = &guiPalette->getColor(Palette::SELF); + mTextColor = &Theme::getThemeColor(Theme::PLAYER); + mNameColor = &userPalette->getColor(UserPalette::SELF); initTargetCursor(); @@ -150,7 +150,7 @@ void LocalPlayer::logic() (int) pos.y - 48,*/ getPixelX(), getPixelY() - 48, - &guiPalette->getColor(info.second), + &userPalette->getColor(info.second), gui->getInfoParticleFont(), true); mMessages.pop_front(); @@ -928,7 +928,7 @@ void LocalPlayer::pickedUp(const ItemInfo &itemInfo, int amount) if (mMap && config.getValue("showpickupparticle", 0)) { // Show pickup notification - addMessageToQueue(itemInfo.getName(), Palette::PICKUP_INFO); + addMessageToQueue(itemInfo.getName(), UserPalette::PICKUP_INFO); } } } @@ -1080,8 +1080,7 @@ void LocalPlayer::loadTargetCursor(const std::string &filename, mTargetCursor[index][size] = currentCursor; } -void LocalPlayer::addMessageToQueue(const std::string &message, - Palette::ColorType color) +void LocalPlayer::addMessageToQueue(const std::string &message, int color) { mMessages.push_back(MessagePair(message, color)); } |