summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tab.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-08 02:57:44 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-08 02:57:44 +0300
commite91282a6213a9809a06cb0cb3deff93e0246fe5b (patch)
tree62d4214d479883aae84a80ea0bb16d6cccfb4bc8 /src/gui/widgets/tab.cpp
parent577b75a14fa04b0d78281257ee7f5e3c42be3b7e (diff)
downloadmanaverse-e91282a6213a9809a06cb0cb3deff93e0246fe5b.tar.gz
manaverse-e91282a6213a9809a06cb0cb3deff93e0246fe5b.tar.bz2
manaverse-e91282a6213a9809a06cb0cb3deff93e0246fe5b.tar.xz
manaverse-e91282a6213a9809a06cb0cb3deff93e0246fe5b.zip
Allow set tab colors from outside of tab.
Diffstat (limited to 'src/gui/widgets/tab.cpp')
-rw-r--r--src/gui/widgets/tab.cpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp
index 0999dc7a9..124579fab 100644
--- a/src/gui/widgets/tab.cpp
+++ b/src/gui/widgets/tab.cpp
@@ -67,11 +67,11 @@ Tab::Tab() :
mTabColor(&Theme::getThemeColor(Theme::TAB)),
mTabHighlightedColor(&Theme::getThemeColor(Theme::TAB_HIGHLIGHTED)),
mTabSelectedColor(&Theme::getThemeColor(Theme::TAB_SELECTED)),
+ mFlashColor(&Theme::getThemeColor(Theme::TAB_FLASH)),
+ mPlayerFlashColor(&Theme::getThemeColor(Theme::TAB_PLAYER_FLASH)),
mVertexes(new GraphicsVertexes()),
mRedraw(true),
- mMode(0),
- mFlashColor(Theme::getThemeColor(Theme::TAB_FLASH)),
- mPlayerFlashColor(Theme::getThemeColor(Theme::TAB_PLAYER_FLASH))
+ mMode(0)
{
init();
}
@@ -161,10 +161,10 @@ void Tab::draw(gcn::Graphics *graphics)
switch (mFlash)
{
case 1:
- mLabel->setForegroundColor(mFlashColor);
+ mLabel->setForegroundColor(*mFlashColor);
break;
case 2:
- mLabel->setForegroundColor(mPlayerFlashColor);
+ mLabel->setForegroundColor(*mPlayerFlashColor);
break;
default:
break;
@@ -192,16 +192,6 @@ void Tab::draw(gcn::Graphics *graphics)
drawChildren(graphics);
}
-void Tab::setTabColor(const gcn::Color *const color)
-{
- mTabColor = color;
-}
-
-void Tab::setFlash(const int flash)
-{
- mFlash = flash;
-}
-
void Tab::widgetResized(const gcn::Event &event A_UNUSED)
{
mRedraw = true;