diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/widgets/tab.cpp | 28 | ||||
-rw-r--r-- | src/gui/widgets/tab.h | 4 |
2 files changed, 20 insertions, 12 deletions
diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp index 6747b19e0..fdcace308 100644 --- a/src/gui/widgets/tab.cpp +++ b/src/gui/widgets/tab.cpp @@ -68,7 +68,7 @@ Tab::Tab(const Widget2 *const widget) : mTabSelectedColor(&getThemeColor(Theme::TAB_SELECTED)), mFlashColor(&getThemeColor(Theme::TAB_FLASH)), mPlayerFlashColor(&getThemeColor(Theme::TAB_PLAYER_FLASH)), - mVertexes(new GraphicsVertexes()), + mVertexes(new ImageCollection), mRedraw(true), mMode(0) { @@ -192,18 +192,26 @@ void Tab::draw(gcn::Graphics *graphics) updateAlpha(); - ImageRect &rect = skin->getBorder(); // draw tab - if (mRedraw || mode != mMode - || static_cast<Graphics*>(graphics)->getRedraw()) + if (openGLMode != 2) { - mMode = mode; - mRedraw = false; - static_cast<Graphics*>(graphics)->calcWindow(mVertexes, 0, 0, - getWidth(), getHeight(), rect); - } + ImageRect &rect = skin->getBorder(); + if (mRedraw || mode != mMode + || static_cast<Graphics*>(graphics)->getRedraw()) + { + mMode = mode; + mRedraw = false; + static_cast<Graphics*>(graphics)->calcWindow(mVertexes, 0, 0, + getWidth(), getHeight(), rect); + } - static_cast<Graphics*>(graphics)->drawImageRect2(mVertexes, rect); + static_cast<Graphics*>(graphics)->drawTile(mVertexes); + } + else + { + static_cast<Graphics*>(graphics)-> + drawImageRect(0, 0, getWidth(), getHeight(), skin->getBorder()); + } // static_cast<Graphics*>(graphics)-> // drawImageRect(0, 0, getWidth(), getHeight(), tabImg[mode]); diff --git a/src/gui/widgets/tab.h b/src/gui/widgets/tab.h index 3589b2905..17237edd7 100644 --- a/src/gui/widgets/tab.h +++ b/src/gui/widgets/tab.h @@ -31,7 +31,7 @@ #include "localconsts.h" -class GraphicsVertexes; +class ImageCollection; class ImageRect; class Label; class Skin; @@ -151,7 +151,7 @@ class Tab : public gcn::BasicContainer, const gcn::Color *mFlashColor; const gcn::Color *mPlayerFlashColor; int mFlash; - GraphicsVertexes *mVertexes; + ImageCollection *mVertexes; bool mRedraw; int mMode; }; |