From e91282a6213a9809a06cb0cb3deff93e0246fe5b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 8 Sep 2012 02:57:44 +0300 Subject: Allow set tab colors from outside of tab. --- src/gui/widgets/tab.h | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) (limited to 'src/gui/widgets/tab.h') diff --git a/src/gui/widgets/tab.h b/src/gui/widgets/tab.h index d0fa41eb6..a8ff5eb3d 100644 --- a/src/gui/widgets/tab.h +++ b/src/gui/widgets/tab.h @@ -52,14 +52,40 @@ class Tab : public gcn::Tab, public gcn::WidgetListener void draw(gcn::Graphics *graphics); /** - * Set the normal color fo the tab's text. + * Set the normal color for the tab's text. */ - void setTabColor(const gcn::Color *const color); + void setTabColor(const gcn::Color *const color) + { mTabColor = color; } + + /** + * Set the highlighted color for the tab's text. + */ + void setHighlightedTabColor(const gcn::Color *const color) + { mTabHighlightedColor = color; } + + /** + * Set the selected color for the tab's text. + */ + void setSelectedTabColor(const gcn::Color *const color) + { mTabSelectedColor = color; } + + /** + * Set the flash color for the tab's text. + */ + void setFlashTabColor(const gcn::Color *const color) + { mFlashColor = color; } + + /** + * Set the player flash color for the tab's text. + */ + void setPlayerFlashTabColor(const gcn::Color *const color) + { mPlayerFlashColor = color; } /** * Set tab flashing state */ - void setFlash(const int flash); + void setFlash(const int flash) + { mFlash = flash; } int getFlash() const { return mFlash; } @@ -89,12 +115,12 @@ class Tab : public gcn::Tab, public gcn::WidgetListener const gcn::Color *mTabColor; const gcn::Color *mTabHighlightedColor; const gcn::Color *mTabSelectedColor; + const gcn::Color *mFlashColor; + const gcn::Color *mPlayerFlashColor; int mFlash; GraphicsVertexes *mVertexes; bool mRedraw; int mMode; - gcn::Color mFlashColor; - gcn::Color mPlayerFlashColor; }; #endif -- cgit v1.2.3-60-g2f50