summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-29 17:42:08 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-29 17:42:08 +0300
commit7eab9ea57500ee7010fc33c8f825e3e70ef85cbd (patch)
tree82df76d91b6c2b6ef81db5ab1720d1b5a655649f /src/gui/widgets
parent576d75990e81bd56f79500840b688045c3130b4a (diff)
downloadmanaplus-7eab9ea57500ee7010fc33c8f825e3e70ef85cbd.tar.gz
manaplus-7eab9ea57500ee7010fc33c8f825e3e70ef85cbd.tar.bz2
manaplus-7eab9ea57500ee7010fc33c8f825e3e70ef85cbd.tar.xz
manaplus-7eab9ea57500ee7010fc33c8f825e3e70ef85cbd.zip
fix some more missign checks.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/popup.cpp29
-rw-r--r--src/gui/widgets/tab.cpp35
2 files changed, 35 insertions, 29 deletions
diff --git a/src/gui/widgets/popup.cpp b/src/gui/widgets/popup.cpp
index 1372c89e2..438b5db29 100644
--- a/src/gui/widgets/popup.cpp
+++ b/src/gui/widgets/popup.cpp
@@ -101,23 +101,26 @@ void Popup::draw(gcn::Graphics *graphics)
BLOCK_START("Popup::draw")
Graphics *const g = static_cast<Graphics*>(graphics);
- if (openGLMode != 2)
+ if (mSkin)
{
- if (mRedraw)
+ if (openGLMode != 2)
+ {
+ if (mRedraw)
+ {
+ mRedraw = false;
+ mVertexes->clear();
+ g->calcWindow(mVertexes, 0, 0,
+ mDimension.width, mDimension.height,
+ mSkin->getBorder());
+ }
+
+ g->drawTile(mVertexes);
+ }
+ else
{
- mRedraw = false;
- mVertexes->clear();
- g->calcWindow(mVertexes, 0, 0,
- mDimension.width, mDimension.height,
+ g->drawImageRect(0, 0, mDimension.width, mDimension.height,
mSkin->getBorder());
}
-
- g->drawTile(mVertexes);
- }
- else
- {
- g->drawImageRect(0, 0, mDimension.width, mDimension.height,
- mSkin->getBorder());
}
drawChildren(graphics);
diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp
index 99a69897d..ac91442fb 100644
--- a/src/gui/widgets/tab.cpp
+++ b/src/gui/widgets/tab.cpp
@@ -218,25 +218,28 @@ void Tab::draw(gcn::Graphics *graphics)
Graphics *const g = static_cast<Graphics*>(graphics);
- // draw tab
- if (openGLMode != 2)
+ if (skin)
{
- const ImageRect &rect = skin->getBorder();
- if (mRedraw || mode != mMode || g->getRedraw())
+ // draw tab
+ if (openGLMode != 2)
{
- mMode = mode;
- mRedraw = false;
- mVertexes->clear();
- g->calcWindow(mVertexes, 0, 0,
- mDimension.width, mDimension.height, rect);
- }
+ const ImageRect &rect = skin->getBorder();
+ if (mRedraw || mode != mMode || g->getRedraw())
+ {
+ mMode = mode;
+ mRedraw = false;
+ mVertexes->clear();
+ g->calcWindow(mVertexes, 0, 0,
+ mDimension.width, mDimension.height, rect);
+ }
- g->drawTile(mVertexes);
- }
- else
- {
- g->drawImageRect(0, 0,
- mDimension.width, mDimension.height, skin->getBorder());
+ g->drawTile(mVertexes);
+ }
+ else
+ {
+ g->drawImageRect(0, 0,
+ mDimension.width, mDimension.height, skin->getBorder());
+ }
}
if (mImage)