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/npc.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/npc.cpp')
-rw-r--r-- | src/npc.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/npc.cpp b/src/npc.cpp index 38aecab8..29a6c61c 100644 --- a/src/npc.cpp +++ b/src/npc.cpp @@ -29,7 +29,7 @@ #include "gui/buysell.h" #include "gui/npcdialog.h" #include "gui/npcpostdialog.h" -#include "gui/palette.h" +#include "gui/userpalette.h" #include "gui/sell.h" #include "net/net.h" @@ -74,6 +74,10 @@ void NPC::setName(const std::string &name) const std::string displayName = name.substr(0, name.find('#', 0)); Being::setName(displayName); + + mNameColor = &userPalette->getColor(UserPalette::NPC); + + mDispName->setColor(mNameColor); } void NPC::talk() |