summaryrefslogtreecommitdiff
path: root/src/gui/widgets/basiccontainer2.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-25 21:47:57 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-25 21:47:57 +0300
commit1f4410ab9ac4064ff0cfb0fd31b4e942bee82277 (patch)
tree4b1089f8ba8b33b26fe74911d31ed2ae0f933824 /src/gui/widgets/basiccontainer2.cpp
parentbea613d8ba11a64ccf36a01735f2839894ca9476 (diff)
downloadmanaverse-1f4410ab9ac4064ff0cfb0fd31b4e942bee82277.tar.gz
manaverse-1f4410ab9ac4064ff0cfb0fd31b4e942bee82277.tar.bz2
manaverse-1f4410ab9ac4064ff0cfb0fd31b4e942bee82277.tar.xz
manaverse-1f4410ab9ac4064ff0cfb0fd31b4e942bee82277.zip
Add method safeDrawChildren for safe OpenGL renderer.
Diffstat (limited to 'src/gui/widgets/basiccontainer2.cpp')
-rw-r--r--src/gui/widgets/basiccontainer2.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/widgets/basiccontainer2.cpp b/src/gui/widgets/basiccontainer2.cpp
index 4a4184f2c..11fca50b3 100644
--- a/src/gui/widgets/basiccontainer2.cpp
+++ b/src/gui/widgets/basiccontainer2.cpp
@@ -94,7 +94,15 @@ void BasicContainer2::draw(Graphics* graphics)
void BasicContainer2::safeDraw(Graphics* graphics)
{
- BasicContainer2::draw(graphics);
+ BLOCK_START("BasicContainer2::draw")
+ if (isOpaque())
+ {
+ graphics->setColor(getBaseColor());
+ graphics->fillRectangle(Rect(0, 0, getWidth(), getHeight()));
+ }
+
+ safeDrawChildren(graphics);
+ BLOCK_END("BasicContainer2::draw")
}
void BasicContainer2::setOpaque(bool opaque)