diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-20 23:49:06 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-20 23:49:06 +0300 |
commit | 898c74f4ded38102360624cad924ecf49af7e36f (patch) | |
tree | 81e6853601ec66516aae978147856081484eb768 | |
parent | ca695ea265e4922319a76e5cec28bd4eeb1b76f0 (diff) | |
download | manaplus-898c74f4ded38102360624cad924ecf49af7e36f.tar.gz manaplus-898c74f4ded38102360624cad924ecf49af7e36f.tar.bz2 manaplus-898c74f4ded38102360624cad924ecf49af7e36f.tar.xz manaplus-898c74f4ded38102360624cad924ecf49af7e36f.zip |
Add theme color for text in popup windows.
New theme color: POPUP
-rw-r--r-- | data/graphics/gui/colors.xml | 1 | ||||
-rw-r--r-- | data/themes/blacknblack/colors.xml | 1 | ||||
-rw-r--r-- | data/themes/blackwood/colors.xml | 1 | ||||
-rw-r--r-- | data/themes/enchilado/colors.xml | 1 | ||||
-rw-r--r-- | data/themes/mana/colors.xml | 1 | ||||
-rw-r--r-- | data/themes/pink/colors.xml | 1 | ||||
-rw-r--r-- | data/themes/unity/colors.xml | 1 | ||||
-rw-r--r-- | data/themes/wood/colors.xml | 1 | ||||
-rw-r--r-- | src/gui/beingpopup.cpp | 10 | ||||
-rw-r--r-- | src/gui/itempopup.cpp | 3 | ||||
-rw-r--r-- | src/gui/spellpopup.cpp | 3 | ||||
-rw-r--r-- | src/gui/statuspopup.cpp | 18 | ||||
-rw-r--r-- | src/gui/textpopup.cpp | 3 | ||||
-rw-r--r-- | src/gui/theme.cpp | 1 | ||||
-rw-r--r-- | src/gui/theme.h | 1 |
15 files changed, 43 insertions, 4 deletions
diff --git a/data/graphics/gui/colors.xml b/data/graphics/gui/colors.xml index 49a5ee367..ca3d61926 100644 --- a/data/graphics/gui/colors.xml +++ b/data/graphics/gui/colors.xml @@ -14,6 +14,7 @@ <color id="LABEL" color="#000000" /> <color id="LISTBOX" color="#000000" /> <color id="RADIOBUTTON" color="#000000" /> + <color id="POPUP" color="#000000" /> <color id="TAB" color="#000000" /> <color id="TAB_HIGHLIGHTED" color="#000000" /> <color id="TAB_SELECTED" color="#000000" /> diff --git a/data/themes/blacknblack/colors.xml b/data/themes/blacknblack/colors.xml index c1f4cbac7..e802e470f 100644 --- a/data/themes/blacknblack/colors.xml +++ b/data/themes/blacknblack/colors.xml @@ -14,6 +14,7 @@ <color id="LABEL" color="#ffffff" /> <color id="LISTBOX" color="#ffffff" /> <color id="RADIOBUTTON" color="#ffffff" /> + <color id="POPUP" color="#ffffff" /> <color id="TAB" color="#13f00d" /> <color id="TAB_HIGHLIGHTED" color="#13f00d" /> <color id="TAB_SELECTED" color="#13f00d" /> diff --git a/data/themes/blackwood/colors.xml b/data/themes/blackwood/colors.xml index cbe809512..cbc7d1d69 100644 --- a/data/themes/blackwood/colors.xml +++ b/data/themes/blackwood/colors.xml @@ -14,6 +14,7 @@ <color id="LABEL" color="#000000" /> <color id="LISTBOX" color="#000000" /> <color id="RADIOBUTTON" color="#000000" /> + <color id="POPUP" color="#000000" /> <color id="TAB" color="#000000" /> <color id="TAB_HIGHLIGHTED" color="#000000" /> <color id="TAB_SELECTED" color="#000000" /> diff --git a/data/themes/enchilado/colors.xml b/data/themes/enchilado/colors.xml index 77fe13740..cb64bfc95 100644 --- a/data/themes/enchilado/colors.xml +++ b/data/themes/enchilado/colors.xml @@ -14,6 +14,7 @@ <color id="LABEL" color="#000000" /> <color id="LISTBOX" color="#000000" /> <color id="RADIOBUTTON" color="#000000" /> + <color id="POPUP" color="#000000" /> <color id="TAB" color="#000000" /> <color id="TAB_HIGHLIGHTED" color="#000000" /> <color id="TAB_SELECTED" color="#000000" /> diff --git a/data/themes/mana/colors.xml b/data/themes/mana/colors.xml index 749718d9e..59e87a047 100644 --- a/data/themes/mana/colors.xml +++ b/data/themes/mana/colors.xml @@ -14,6 +14,7 @@ <color id="LABEL" color="#000000" /> <color id="LISTBOX" color="#000000" /> <color id="RADIOBUTTON" color="#000000" /> + <color id="POPUP" color="#000000" /> <color id="TAB" color="#000000" /> <color id="TAB_HIGHLIGHTED" color="#000000" /> <color id="TAB_SELECTED" color="#000000" /> diff --git a/data/themes/pink/colors.xml b/data/themes/pink/colors.xml index 05a1f9dab..b8a0139f9 100644 --- a/data/themes/pink/colors.xml +++ b/data/themes/pink/colors.xml @@ -14,6 +14,7 @@ <color id="LABEL" color="#FF00FF" /> <color id="LISTBOX" color="#FF00FF" /> <color id="RADIOBUTTON" color="#FF00FF" /> + <color id="POPUP" color="#FF00FF" /> <color id="TAB" color="#FF32FF" /> <color id="TAB_HIGHLIGHTED" color="#FF32FF" /> <color id="TAB_SELECTED" color="#FF32FF" /> diff --git a/data/themes/unity/colors.xml b/data/themes/unity/colors.xml index 4c944e25a..eaddc0147 100644 --- a/data/themes/unity/colors.xml +++ b/data/themes/unity/colors.xml @@ -13,6 +13,7 @@ <color id="LABEL" color="#E0E0E0" /> <color id="LISTBOX" color="#E0E0E0" /> <color id="RADIOBUTTON" color="#E0E0E0" /> + <color id="POPUP" color="#E0E0E0" /> <color id="TAB" color="#E0E0E0" /> <color id="TAB_HIGHLIGHTED" color="#E0E0E0" /> <color id="TAB_SELECTED" color="#E0E0E0" /> diff --git a/data/themes/wood/colors.xml b/data/themes/wood/colors.xml index ddf935d57..b73b65e9c 100644 --- a/data/themes/wood/colors.xml +++ b/data/themes/wood/colors.xml @@ -14,6 +14,7 @@ <color id="LABEL" color="#000000" /> <color id="LISTBOX" color="#000000" /> <color id="RADIOBUTTON" color="#000000" /> + <color id="POPUP" color="#000000" /> <color id="TAB" color="#000000" /> <color id="TAB_HIGHLIGHTED" color="#000000" /> <color id="TAB_SELECTED" color="#000000" /> diff --git a/src/gui/beingpopup.cpp b/src/gui/beingpopup.cpp index f7118d48c..865e29abd 100644 --- a/src/gui/beingpopup.cpp +++ b/src/gui/beingpopup.cpp @@ -55,14 +55,16 @@ BeingPopup::BeingPopup() : // Being's party mBeingParty->setPosition(getPadding(), fontHeight); - // Being's party mBeingGuild->setPosition(getPadding(), 2 * fontHeight); - mBeingRank->setPosition(getPadding(), 3 * fontHeight); - mBeingComment->setPosition(getPadding(), 4 * fontHeight); + mBeingParty->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); + mBeingGuild->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); + mBeingRank->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); + mBeingComment->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); + add(mBeingName); add(mBeingParty); add(mBeingGuild); @@ -110,7 +112,7 @@ void BeingPopup::show(const int x, const int y, Being *const b) } else { - mBeingName->setForegroundColor(Theme::getThemeColor(Theme::LABEL)); + mBeingName->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); } mBeingName->adjustSize(); diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp index 4b0501def..b1c363a67 100644 --- a/src/gui/itempopup.cpp +++ b/src/gui/itempopup.cpp @@ -67,14 +67,17 @@ ItemPopup::ItemPopup(): // Item Description mItemDesc->setEditable(false); mItemDesc->setPosition(getPadding(), fontHeight); + mItemDesc->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); // Item Effect mItemEffect->setEditable(false); mItemEffect->setPosition(getPadding(), 2 * fontHeight + 2 * getPadding()); + mItemEffect->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); // Item Weight mItemWeight->setEditable(false); mItemWeight->setPosition(getPadding(), 3 * fontHeight + 4 * getPadding()); + mItemWeight->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); add(mItemName); add(mItemDesc); diff --git a/src/gui/spellpopup.cpp b/src/gui/spellpopup.cpp index 9267e76df..49eba7f43 100644 --- a/src/gui/spellpopup.cpp +++ b/src/gui/spellpopup.cpp @@ -26,6 +26,7 @@ #include "gui/gui.h" #include "gui/palette.h" #include "gui/sdlfont.h" +#include "gui/theme.h" #include "gui/widgets/label.h" @@ -44,6 +45,8 @@ SpellPopup::SpellPopup(): mItemComment(new Label) { mItemName->setFont(boldFont); + mItemName->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); + mItemComment->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); add(mItemName); add(mItemComment); diff --git a/src/gui/statuspopup.cpp b/src/gui/statuspopup.cpp index 0bba7a505..ac222408b 100644 --- a/src/gui/statuspopup.cpp +++ b/src/gui/statuspopup.cpp @@ -25,6 +25,7 @@ #include "gui/gui.h" #include "gui/palette.h" +#include "gui/theme.h" #include "gui/viewport.h" #include "gui/widgets/label.h" @@ -85,6 +86,23 @@ StatusPopup::StatusPopup() : mDisableGameModifiers->setPosition(getPadding(), 20 + 14 * fontHeight + getPadding()); + mMoveType->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); + mCrazyMoveType->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); + mMoveToTargetType->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); + mFollowMode->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); + mAttackWeaponType->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); + mAttackType->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); + mMagicAttackType->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); + mPvpAttackType->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); + mDropCounter->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); + mPickUpType->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); + mMapType->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); + mImitationMode->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); + mAwayMode->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); + mCameraMode->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); + mDisableGameModifiers->setForegroundColor( + Theme::getThemeColor(Theme::POPUP)); + add(mMoveType); add(mCrazyMoveType); add(mMoveToTargetType); diff --git a/src/gui/textpopup.cpp b/src/gui/textpopup.cpp index 219b25633..d542bdcde 100644 --- a/src/gui/textpopup.cpp +++ b/src/gui/textpopup.cpp @@ -46,8 +46,11 @@ TextPopup::TextPopup(): const int fontHeight = getFont()->getHeight(); mText1->setPosition(getPadding(), getPadding()); + mText1->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); mText2->setPosition(getPadding(), fontHeight + 2 * getPadding()); + mText2->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); mText3->setPosition(getPadding(), (2 * fontHeight) + 2 * getPadding()); + mText3->setForegroundColor(Theme::getThemeColor(Theme::POPUP)); add(mText1); add(mText2); diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index c421e40e3..b6509348f 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -709,6 +709,7 @@ static int readColorType(const std::string &type) "LABEL", "LISTBOX", "RADIOBUTTON", + "POPUP", "TAB", "TAB_HIGHLIGHTED", "TAB_SELECTED", diff --git a/src/gui/theme.h b/src/gui/theme.h index 1800addc8..aeed253ed 100644 --- a/src/gui/theme.h +++ b/src/gui/theme.h @@ -179,6 +179,7 @@ class Theme : public Palette, public ConfigListener LABEL, LISTBOX, RADIOBUTTON, + POPUP, TAB, TAB_HIGHLIGHTED, TAB_SELECTED, |