summaryrefslogtreecommitdiff
path: root/src/gui/widgets/popup.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-25 17:21:15 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-25 17:21:15 +0300
commite3672baa9a0d62ffcc1cb693cbb94644755b6d58 (patch)
tree797d479ab57bdb1eba5760f96c755f85372161d3 /src/gui/widgets/popup.cpp
parent68d07e98a4d8721b9e93a87ecd573fbc336b565b (diff)
downloadplus-e3672baa9a0d62ffcc1cb693cbb94644755b6d58.tar.gz
plus-e3672baa9a0d62ffcc1cb693cbb94644755b6d58.tar.bz2
plus-e3672baa9a0d62ffcc1cb693cbb94644755b6d58.tar.xz
plus-e3672baa9a0d62ffcc1cb693cbb94644755b6d58.zip
Add safeDraw method into popup.
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;