summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs/tab.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-15 22:21:02 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-15 22:21:02 +0300
commitca9fac131283ed536971799bef0d1fff4ef8adc1 (patch)
treeec70584d20b117c5d2446ef42b898eeacdda9d12 /src/gui/widgets/tabs/tab.cpp
parent29f929794c7519b049de0be3af635f05d7e83be6 (diff)
downloadmanaverse-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.gz
manaverse-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.bz2
manaverse-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.xz
manaverse-ca9fac131283ed536971799bef0d1fff4ef8adc1.zip
Remove useless graphics casts.
Diffstat (limited to 'src/gui/widgets/tabs/tab.cpp')
-rw-r--r--src/gui/widgets/tabs/tab.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/gui/widgets/tabs/tab.cpp b/src/gui/widgets/tabs/tab.cpp
index d0561cadf..bba1ef7b6 100644
--- a/src/gui/widgets/tabs/tab.cpp
+++ b/src/gui/widgets/tabs/tab.cpp
@@ -204,19 +204,19 @@ void Tab::draw(Graphics *graphics)
updateAlpha();
- Graphics *const g = static_cast<Graphics*>(graphics);
-
// draw tab
if (isBatchDrawRenders(openGLMode))
{
const ImageRect &rect = skin->getBorder();
- if (mRedraw || mode != mMode || g->getRedraw())
+ if (mRedraw || mode != mMode || graphics->getRedraw())
{
mMode = mode;
mRedraw = false;
mVertexes->clear();
- g->calcWindow(mVertexes, 0, 0,
- mDimension.width, mDimension.height, rect);
+ graphics->calcWindow(mVertexes,
+ 0, 0,
+ mDimension.width, mDimension.height,
+ rect);
if (mImage)
{
@@ -224,25 +224,28 @@ void Tab::draw(Graphics *graphics)
if (skin1)
{
const int padding = skin1->getPadding();
- g->calcTileCollection(mVertexes, mImage,
- padding, padding);
+ graphics->calcTileCollection(mVertexes,
+ mImage,
+ padding,
+ padding);
}
}
}
- g->drawTileCollection(mVertexes);
+ graphics->drawTileCollection(mVertexes);
}
else
{
- g->drawImageRect(0, 0,
- mDimension.width, mDimension.height, skin->getBorder());
+ graphics->drawImageRect(0, 0,
+ mDimension.width, mDimension.height,
+ skin->getBorder());
if (mImage)
{
const Skin *const skin1 = tabImg[TAB_STANDARD];
if (skin1)
{
const int padding = skin1->getPadding();
- g->drawImage2(mImage, padding, padding);
+ graphics->drawImage2(mImage, padding, padding);
}
}
}