summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-20 23:49:06 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-20 23:49:06 +0300
commit898c74f4ded38102360624cad924ecf49af7e36f (patch)
tree81e6853601ec66516aae978147856081484eb768 /src/gui
parentca695ea265e4922319a76e5cec28bd4eeb1b76f0 (diff)
downloadplus-898c74f4ded38102360624cad924ecf49af7e36f.tar.gz
plus-898c74f4ded38102360624cad924ecf49af7e36f.tar.bz2
plus-898c74f4ded38102360624cad924ecf49af7e36f.tar.xz
plus-898c74f4ded38102360624cad924ecf49af7e36f.zip
Add theme color for text in popup windows.
New theme color: POPUP
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/beingpopup.cpp10
-rw-r--r--src/gui/itempopup.cpp3
-rw-r--r--src/gui/spellpopup.cpp3
-rw-r--r--src/gui/statuspopup.cpp18
-rw-r--r--src/gui/textpopup.cpp3
-rw-r--r--src/gui/theme.cpp1
-rw-r--r--src/gui/theme.h1
7 files changed, 35 insertions, 4 deletions
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,