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 /src | |
parent | dddfb405de9d04f50d3a95cc3b0ebc3e49884a65 (diff) | |
download | manaverse-8257d7d35e0dd915512df06cafb810f4611be06a.tar.gz manaverse-8257d7d35e0dd915512df06cafb810f4611be06a.tar.bz2 manaverse-8257d7d35e0dd915512df06cafb810f4611be06a.tar.xz manaverse-8257d7d35e0dd915512df06cafb810f4611be06a.zip |
Fix some theme font colors in different gui elements.
Add new color ITEM_NOT_EQUIPPED.
Diffstat (limited to 'src')
-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 |
10 files changed, 32 insertions, 23 deletions
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"); |