summaryrefslogtreecommitdiff
path: root/src/gui/widgets/popup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/popup.cpp')
-rw-r--r--src/gui/widgets/popup.cpp40
1 files changed, 23 insertions, 17 deletions
diff --git a/src/gui/widgets/popup.cpp b/src/gui/widgets/popup.cpp
index 7383ac94b..2e9b3b99b 100644
--- a/src/gui/widgets/popup.cpp
+++ b/src/gui/widgets/popup.cpp
@@ -108,33 +108,39 @@ void Popup::draw(Graphics *graphics)
if (mSkin)
{
- if (isBatchDrawRenders(openGLMode))
+ if (mRedraw)
{
- if (mRedraw)
- {
- mRedraw = false;
- mVertexes->clear();
- graphics->calcWindow(mVertexes,
- 0, 0,
- mDimension.width, mDimension.height,
- mSkin->getBorder());
- }
- // need cache or remove calc call.
- graphics->finalize(mVertexes);
- graphics->drawTileCollection(mVertexes);
- }
- else
- {
- graphics->drawImageRect(0, 0,
+ mRedraw = false;
+ mVertexes->clear();
+ graphics->calcWindow(mVertexes,
+ 0, 0,
mDimension.width, mDimension.height,
mSkin->getBorder());
}
+ // need cache or remove calc call.
+ graphics->finalize(mVertexes);
+ graphics->drawTileCollection(mVertexes);
}
drawChildren(graphics);
BLOCK_END("Popup::draw")
}
+void Popup::safeDraw(Graphics *graphics)
+{
+ BLOCK_START("Popup::safeDraw")
+
+ if (mSkin)
+ {
+ graphics->drawImageRect(0, 0,
+ mDimension.width, mDimension.height,
+ mSkin->getBorder());
+ }
+
+ drawChildren(graphics);
+ BLOCK_END("Popup::safeDraw")
+}
+
Rect Popup::getChildrenArea()
{
const int pad2 = mPadding * 2;