diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-08-22 04:38:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-08-22 04:38:03 +0300 |
commit | 8257d7d35e0dd915512df06cafb810f4611be06a (patch) | |
tree | 7d4449df4e7b9e27bd1e069eb0132931dfd2a5f1 | |
parent | dddfb405de9d04f50d3a95cc3b0ebc3e49884a65 (diff) | |
download | mv-8257d7d35e0dd915512df06cafb810f4611be06a.tar.gz mv-8257d7d35e0dd915512df06cafb810f4611be06a.tar.bz2 mv-8257d7d35e0dd915512df06cafb810f4611be06a.tar.xz mv-8257d7d35e0dd915512df06cafb810f4611be06a.zip |
Fix some theme font colors in different gui elements.
Add new color ITEM_NOT_EQUIPPED.
-rw-r--r-- | data/graphics/gui/colors.xml | 1 | ||||
-rw-r--r-- | data/themes/blackwood/colors.xml | 1 | ||||
-rw-r--r-- | data/themes/enchilado/colors.xml | 3 | ||||
-rw-r--r-- | data/themes/mana/colors.xml | 1 | ||||
-rw-r--r-- | data/themes/pink/colors.xml | 1 | ||||
-rw-r--r-- | data/themes/redandblack/colors.xml | 1 | ||||
-rw-r--r-- | data/themes/wood/colors.xml | 1 | ||||
-rw-r--r-- | src/gui/equipmentwindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/itempopup.cpp | 3 | ||||
-rw-r--r-- | src/gui/spellpopup.cpp | 5 | ||||
-rw-r--r-- | src/gui/statuspopup.cpp | 29 | ||||
-rw-r--r-- | src/gui/textpopup.cpp | 10 | ||||
-rw-r--r-- | src/gui/theme.cpp | 1 | ||||
-rw-r--r-- | src/gui/theme.h | 1 | ||||
-rw-r--r-- | src/gui/widgets/itemcontainer.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/label.cpp | 1 | ||||
-rw-r--r-- | src/gui/widgets/radiobutton.cpp | 1 |
17 files changed, 40 insertions, 24 deletions
diff --git a/data/graphics/gui/colors.xml b/data/graphics/gui/colors.xml index df42dcdfd..b17e4b80c 100644 --- a/data/graphics/gui/colors.xml +++ b/data/graphics/gui/colors.xml @@ -16,6 +16,7 @@ <color id="TAB_PLAYER_FLASH" color="#00ff00" effect="pulse" /> <color id="SHOP_WARNING" color="#910000" /> <color id="ITEM_EQUIPPED" color="#000091" /> + <color id="ITEM_NOT_EQUIPPED" color="#000000" /> <color id="CHAT" color="#000000" /> <color id="GM" color="#ff0000" /> <color id="PLAYER" color="#003000" /> diff --git a/data/themes/blackwood/colors.xml b/data/themes/blackwood/colors.xml index 51eba63fe..b30121a6b 100644 --- a/data/themes/blackwood/colors.xml +++ b/data/themes/blackwood/colors.xml @@ -16,6 +16,7 @@ <color id="TAB_PLAYER_FLASH" color="#00ff00" effect="pulse" /> <color id="SHOP_WARNING" color="#910000" /> <color id="ITEM_EQUIPPED" color="#000091" /> + <color id="ITEM_NOT_EQUIPPED" color="#000000" /> <color id="CHAT" color="#744c04" /> <color id="GM" color="#ff0000" /> <color id="PLAYER" color="#00ff00" /> diff --git a/data/themes/enchilado/colors.xml b/data/themes/enchilado/colors.xml index e7ab17da2..839f06772 100644 --- a/data/themes/enchilado/colors.xml +++ b/data/themes/enchilado/colors.xml @@ -16,11 +16,12 @@ <color id="TAB_PLAYER_FLASH" color="#00ff00" effect="pulse" /> <color id="SHOP_WARNING" color="#910000" /> <color id="ITEM_EQUIPPED" color="#000091" /> + <color id="ITEM_NOT_EQUIPPED" color="#000000" /> <color id="CHAT" color="#000000" /> <color id="GM" color="#ff0000" /> <color id="PLAYER" color="#009000" /> <color id="WHISPER" color="#0000ff" /> - <color id="WHISPER_OFFLINE" color="#000050" /> + <color id="WHISPER_OFFLINE" color="#000050" /> <color id="IS" color="#705000" /> <color id="SERVER" color="#8415e2" /> <color id="LOGGER" color="#919191" /> diff --git a/data/themes/mana/colors.xml b/data/themes/mana/colors.xml index 557ba34d5..9e7b73c69 100644 --- a/data/themes/mana/colors.xml +++ b/data/themes/mana/colors.xml @@ -16,6 +16,7 @@ <color id="TAB_PLAYER_FLASH" color="#00ff00" effect="pulse" /> <color id="SHOP_WARNING" color="#910000" /> <color id="ITEM_EQUIPPED" color="#000091" /> + <color id="ITEM_NOT_EQUIPPED" color="#000000" /> <color id="CHAT" color="#000000" /> <color id="GM" color="#ff0000" /> <color id="PLAYER" color="#003000" /> diff --git a/data/themes/pink/colors.xml b/data/themes/pink/colors.xml index b49be8015..2e56c6e3c 100644 --- a/data/themes/pink/colors.xml +++ b/data/themes/pink/colors.xml @@ -16,6 +16,7 @@ <color id="TAB_PLAYER_FLASH" color="#00ff00" effect="pulse" /> <color id="SHOP_WARNING" color="#910000" /> <color id="ITEM_EQUIPPED" color="#000091" /> + <color id="ITEM_NOT_EQUIPPED" color="#000000" /> <color id="CHAT" color="#FF00FF" /> <color id="GM" color="#ff0000" /> <color id="PLAYER" color="#009000" /> diff --git a/data/themes/redandblack/colors.xml b/data/themes/redandblack/colors.xml index 50384ce3a..fc026b361 100644 --- a/data/themes/redandblack/colors.xml +++ b/data/themes/redandblack/colors.xml @@ -16,6 +16,7 @@ <color id="TAB_PLAYER_FLASH" color="#00ff00" effect="pulse" /> <color id="SHOP_WARNING" color="#910000" /> <color id="ITEM_EQUIPPED" color="#000091" /> + <color id="ITEM_NOT_EQUIPPED" color="#000000" /> <color id="CHAT" color="#000000" /> <color id="GM" color="#ff0000" /> <color id="PLAYER" color="#1fa052" /> diff --git a/data/themes/wood/colors.xml b/data/themes/wood/colors.xml index 13d942d62..67c2da3c7 100644 --- a/data/themes/wood/colors.xml +++ b/data/themes/wood/colors.xml @@ -16,6 +16,7 @@ <color id="TAB_PLAYER_FLASH" color="#00ff00" effect="pulse" /> <color id="SHOP_WARNING" color="#910000" /> <color id="ITEM_EQUIPPED" color="#000091" /> + <color id="ITEM_NOT_EQUIPPED" color="#000000" /> <color id="CHAT" color="#000000" /> <color id="GM" color="#ff0000" /> <color id="PLAYER" color="#003000" /> diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp index 67ec78e49..ddcd6b81c 100644 --- a/src/gui/equipmentwindow.cpp +++ b/src/gui/equipmentwindow.cpp @@ -147,7 +147,7 @@ void EquipmentWindow::draw(gcn::Graphics *graphics) } // Set color black - g->setColor(gcn::Color(0, 0, 0)); + g->setColor(Theme::getThemeColor(Theme::OUTLINE)); // Draw box border g->drawRectangle(gcn::Rectangle(box->first, box->second, BOX_WIDTH, BOX_HEIGHT)); diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp index f5117ed5a..4d401a627 100644 --- a/src/gui/itempopup.cpp +++ b/src/gui/itempopup.cpp @@ -32,6 +32,7 @@ #include "gui/theme.h" #include "gui/widgets/icon.h" +#include "gui/widgets/label.h" #include "gui/widgets/textbox.h" #include "utils/gettext.h" @@ -54,7 +55,7 @@ ItemPopup::ItemPopup(): mLastColor(1) { // Item Name - mItemName = new gcn::Label; + mItemName = new Label; mItemName->setFont(boldFont); mItemName->setPosition(getPadding(), getPadding()); diff --git a/src/gui/spellpopup.cpp b/src/gui/spellpopup.cpp index 86aeb2206..a918e037d 100644 --- a/src/gui/spellpopup.cpp +++ b/src/gui/spellpopup.cpp @@ -27,6 +27,8 @@ #include "gui/gui.h" #include "gui/palette.h" +#include "gui/widgets/label.h" + #include "textcommand.h" #include "graphics.h" @@ -36,7 +38,6 @@ #include "utils/stringutils.h" #include <guichan/font.hpp> -#include <guichan/widgets/label.hpp> #include "debug.h" @@ -44,7 +45,7 @@ SpellPopup::SpellPopup(): Popup("SpellPopup") { // Item Name - mItemName = new gcn::Label; + mItemName = new Label; mItemName->setFont(boldFont); mItemName->setPosition(getPadding(), getPadding()); diff --git a/src/gui/statuspopup.cpp b/src/gui/statuspopup.cpp index 08400a916..bb7a295ab 100644 --- a/src/gui/statuspopup.cpp +++ b/src/gui/statuspopup.cpp @@ -28,6 +28,7 @@ #include "gui/palette.h" #include "gui/viewport.h" +#include "gui/widgets/label.h" #include "gui/widgets/layout.h" #include "gui/widgets/textbox.h" @@ -50,51 +51,51 @@ StatusPopup::StatusPopup(): const int fontHeight = getFont()->getHeight(); - mMoveType = new gcn::Label; + mMoveType = new Label; mMoveType->setPosition(getPadding(), getPadding()); - mCrazyMoveType = new gcn::Label; + mCrazyMoveType = new Label; mCrazyMoveType->setPosition(getPadding(), fontHeight + getPadding()); - mMoveToTargetType = new gcn::Label; + mMoveToTargetType = new Label; mMoveToTargetType->setPosition(getPadding(), 2 * fontHeight + getPadding()); - mFollowMode = new gcn::Label; + mFollowMode = new Label; mFollowMode->setPosition(getPadding(), 3 * fontHeight + getPadding()); - mAttackWeaponType = new gcn::Label; + mAttackWeaponType = new Label; mAttackWeaponType->setPosition(getPadding(), 4 + 4 * fontHeight + getPadding()); - mAttackType = new gcn::Label; + mAttackType = new Label; mAttackType->setPosition(getPadding(), 4 + 5 * fontHeight + getPadding()); - mMagicAttackType = new gcn::Label; + mMagicAttackType = new Label; mMagicAttackType->setPosition(getPadding(), 4 + 6 * fontHeight + getPadding()); - mDropCounter = new gcn::Label; + mDropCounter = new Label; mDropCounter->setPosition(getPadding(), 8 + 7 * fontHeight + getPadding()); - mPickUpType = new gcn::Label; + mPickUpType = new Label; mPickUpType->setPosition(getPadding(), 8 + 8 * fontHeight + getPadding()); - mMapType = new gcn::Label; + mMapType = new Label; mMapType->setPosition(getPadding(), 12 + 9 * fontHeight + getPadding()); - mImitationMode = new gcn::Label; + mImitationMode = new Label; mImitationMode->setPosition(getPadding(), 16 + 10 * fontHeight + getPadding()); - mAwayMode = new gcn::Label; + mAwayMode = new Label; mAwayMode->setPosition(getPadding(), 16 + 11 * fontHeight + getPadding()); - mCameraMode = new gcn::Label; + mCameraMode = new Label; mCameraMode->setPosition(getPadding(), 16 + 12 * fontHeight + getPadding()); - mDisableGameModifiers = new gcn::Label; + mDisableGameModifiers = new Label; mDisableGameModifiers->setPosition(getPadding(), 20 + 13 * fontHeight + getPadding()); diff --git a/src/gui/textpopup.cpp b/src/gui/textpopup.cpp index 7f1e0e6b8..1ff601154 100644 --- a/src/gui/textpopup.cpp +++ b/src/gui/textpopup.cpp @@ -26,6 +26,9 @@ #include "gui/gui.h" #include "gui/palette.h" +#include "gui/theme.h" + +#include "gui/widgets/label.h" #include "graphics.h" #include "units.h" @@ -34,7 +37,6 @@ #include "utils/stringutils.h" #include <guichan/font.hpp> -#include <guichan/widgets/label.hpp> #include "debug.h" @@ -43,13 +45,13 @@ TextPopup::TextPopup(): { const int fontHeight = getFont()->getHeight(); - mText1 = new gcn::Label; + mText1 = new Label; mText1->setPosition(getPadding(), getPadding()); - mText2 = new gcn::Label; + mText2 = new Label; mText2->setPosition(getPadding(), fontHeight + 2 * getPadding()); - mText3 = new gcn::Label; + mText3 = new Label; mText3->setPosition(getPadding(), (2 * fontHeight) + 2 * getPadding()); add(mText1); diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index 056eafc0f..e126c0505 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -613,6 +613,7 @@ static int readColorType(const std::string &type) "TAB_PLAYER_FLASH", "SHOP_WARNING", "ITEM_EQUIPPED", + "ITEM_NOT_EQUIPPED", "CHAT", "GM", "PLAYER", diff --git a/src/gui/theme.h b/src/gui/theme.h index 120214232..5fe938a20 100644 --- a/src/gui/theme.h +++ b/src/gui/theme.h @@ -157,6 +157,7 @@ class Theme : public Palette, public ConfigListener TAB_PLAYER_FLASH, SHOP_WARNING, ITEM_EQUIPPED, + ITEM_NOT_EQUIPPED, CHAT, GM, PLAYER, diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index b79f26226..c2a5ec1b7 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -206,7 +206,7 @@ void ItemContainer::draw(gcn::Graphics *graphics) if (item->isEquipped()) g->setColor(Theme::getThemeColor(Theme::ITEM_EQUIPPED)); else - g->setColor(gcn::Color(0, 0, 0)); + g->setColor(Theme::getThemeColor(Theme::ITEM_NOT_EQUIPPED)); g->drawText(caption, itemX + BOX_WIDTH / 2, itemY + BOX_HEIGHT - 14, gcn::Graphics::CENTER); diff --git a/src/gui/widgets/label.cpp b/src/gui/widgets/label.cpp index 16b813dd5..67e8bd12b 100644 --- a/src/gui/widgets/label.cpp +++ b/src/gui/widgets/label.cpp @@ -26,6 +26,7 @@ Label::Label() { + setForegroundColor(Theme::getThemeColor(Theme::TEXT)); } Label::Label(const std::string &caption) : diff --git a/src/gui/widgets/radiobutton.cpp b/src/gui/widgets/radiobutton.cpp index a82ec3e8d..e641be323 100644 --- a/src/gui/widgets/radiobutton.cpp +++ b/src/gui/widgets/radiobutton.cpp @@ -46,6 +46,7 @@ RadioButton::RadioButton(const std::string &caption, const std::string &group, gcn::RadioButton(caption, group, marked), mHasMouse(false) { + setForegroundColor(Theme::getThemeColor(Theme::TEXT)); if (instances == 0) { radioNormal = Theme::getImageFromTheme("radioout.png"); |