summaryrefslogtreecommitdiff
path: root/src/gui/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/window.cpp')
-rw-r--r--src/gui/window.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index aa8569f2..fdbeb699 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -34,6 +34,7 @@ Window::Window(const std::string& caption, bool modal, Window *parent):
gcn::Window(caption),
parent(parent),
snapSize(8),
+ title(true),
modal(modal),
resizable(false),
mMouseResize(false),
@@ -128,18 +129,12 @@ void Window::draw(gcn::Graphics* graphics)
border);
// Draw title
- graphics->setFont(getFont());
- graphics->drawText(getCaption(), 7, 5, gcn::Graphics::LEFT);
-
- if (mContent != NULL)
- {
- graphics->pushClipArea(getContentDimension());
- graphics->pushClipArea(gcn::Rectangle(
- 0, 0, mContent->getWidth(), mContent->getHeight()));
- mContent->draw(graphics);
- graphics->popClipArea();
- graphics->popClipArea();
+ if (title) {
+ graphics->setFont(getFont());
+ graphics->drawText(getCaption(), 7, 5, gcn::Graphics::LEFT);
}
+
+ drawContent(graphics);
}
void Window::setContentWidth(int width)