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/gui/itempopup.cpp | |
parent | 96b64757954f07d196599b3c1131a6603982c930 (diff) | |
download | mana-client-781b3c9f17708cc5fe08eb3c9ee38d596364d97c.tar.gz mana-client-781b3c9f17708cc5fe08eb3c9ee38d596364d97c.tar.bz2 mana-client-781b3c9f17708cc5fe08eb3c9ee38d596364d97c.tar.xz mana-client-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/gui/itempopup.cpp')
-rw-r--r-- | src/gui/itempopup.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp index 1d41449d..72a46696 100644 --- a/src/gui/itempopup.cpp +++ b/src/gui/itempopup.cpp @@ -26,7 +26,7 @@ #include "units.h" #include "gui/gui.h" -#include "gui/palette.h" +#include "gui/theme.h" #include "gui/widgets/textbox.h" @@ -136,33 +136,33 @@ gcn::Color ItemPopup::getColor(ItemType type) switch (type) { case ITEM_UNUSABLE: - return guiPalette->getColor(Palette::GENERIC); + return Theme::getThemeColor(Theme::GENERIC); case ITEM_USABLE: - return guiPalette->getColor(Palette::USABLE); + return Theme::getThemeColor(Theme::USABLE); case ITEM_EQUIPMENT_ONE_HAND_WEAPON: - return guiPalette->getColor(Palette::ONEHAND); + return Theme::getThemeColor(Theme::ONEHAND); case ITEM_EQUIPMENT_TWO_HANDS_WEAPON: - return guiPalette->getColor(Palette::TWOHAND); + return Theme::getThemeColor(Theme::TWOHAND); case ITEM_EQUIPMENT_TORSO: - return guiPalette->getColor(Palette::TORSO); + return Theme::getThemeColor(Theme::TORSO); case ITEM_EQUIPMENT_ARMS: - return guiPalette->getColor(Palette::ARMS); + return Theme::getThemeColor(Theme::ARMS); case ITEM_EQUIPMENT_HEAD: - return guiPalette->getColor(Palette::HEAD); + return Theme::getThemeColor(Theme::HEAD); case ITEM_EQUIPMENT_LEGS: - return guiPalette->getColor(Palette::LEGS); + return Theme::getThemeColor(Theme::LEGS); case ITEM_EQUIPMENT_SHIELD: - return guiPalette->getColor(Palette::SHIELD); + return Theme::getThemeColor(Theme::SHIELD); case ITEM_EQUIPMENT_RING: - return guiPalette->getColor(Palette::RING); + return Theme::getThemeColor(Theme::RING); case ITEM_EQUIPMENT_NECKLACE: - return guiPalette->getColor(Palette::NECKLACE); + return Theme::getThemeColor(Theme::NECKLACE); case ITEM_EQUIPMENT_FEET: - return guiPalette->getColor(Palette::FEET); + return Theme::getThemeColor(Theme::FEET); case ITEM_EQUIPMENT_AMMO: - return guiPalette->getColor(Palette::AMMO); + return Theme::getThemeColor(Theme::AMMO); default: - return guiPalette->getColor(Palette::UNKNOWN_ITEM); + return Theme::getThemeColor(Theme::UNKNOWN_ITEM); } } |