summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-05 23:36:56 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-05 23:36:56 +0300
commit2f1650a30d6f3d2f69f09ee1ad3258fc8b0c7e32 (patch)
tree1cd733466daba2b55aff5aaf9e90245d0b1f3c9b /src/gui
parent180de8ec6d87d2db1952a834fb1634db57b43fe3 (diff)
downloadmanaverse-2f1650a30d6f3d2f69f09ee1ad3258fc8b0c7e32.tar.gz
manaverse-2f1650a30d6f3d2f69f09ee1ad3258fc8b0c7e32.tar.bz2
manaverse-2f1650a30d6f3d2f69f09ee1ad3258fc8b0c7e32.tar.xz
manaverse-2f1650a30d6f3d2f69f09ee1ad3258fc8b0c7e32.zip
dehardcode status bar colors (yellow bar).
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/statuswindow.cpp16
-rw-r--r--src/gui/theme.cpp4
-rw-r--r--src/gui/theme.h2
3 files changed, 7 insertions, 15 deletions
diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp
index cd7a6e6fd..3bde3eddc 100644
--- a/src/gui/statuswindow.cpp
+++ b/src/gui/statuswindow.cpp
@@ -731,21 +731,9 @@ void StatusWindow::updateStatusBar(ProgressBar *const bar,
bar->setProgress(50);
if (player_node->getDisableGameModifiers())
- {
- gcn::Color col;
- col.r = 100;
- col.g = 100;
- col.b = 100;
- bar->setColor(col);
- }
+ bar->setColor(Theme::getThemeColor(Theme::STATUSBAR_ON));
else
- {
- gcn::Color col;
- col.r = 255;
- col.g = 255;
- col.b = 0;
- bar->setColor(col);
- }
+ bar->setColor(Theme::getThemeColor(Theme::STATUSBAR_OFF));
}
void StatusWindow::action(const gcn::ActionEvent &event)
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 76b5e5c7b..c5d358cab 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -910,7 +910,9 @@ static int readColorType(const std::string &type)
"GRAY",
"GRAY_OUTLINE",
"BROWN",
- "BROWN_OUTLINE"
+ "BROWN_OUTLINE",
+ "STATUSBAR_ON",
+ "STATUSBAR_OFF"
};
if (type.empty())
diff --git a/src/gui/theme.h b/src/gui/theme.h
index 87e5dbef2..084868ef2 100644
--- a/src/gui/theme.h
+++ b/src/gui/theme.h
@@ -351,6 +351,8 @@ class Theme final : public Palette, public ConfigListener
GRAY_OUTLINE,
BROWN,
BROWN_OUTLINE,
+ STATUSBAR_ON,
+ STATUSBAR_OFF,
THEME_COLORS_END
};