summaryrefslogtreecommitdiff
path: root/src/gui/window.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-07-13 22:44:23 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-07-13 22:44:23 +0000
commit4ecc89dcc6516b10c6dab8b79dcaa435ec9e1435 (patch)
treeaf49a9d05531e9cf9c87b6ad543338c2d68de4ee /src/gui/window.cpp
parent1ae9c54d120338e4165d168c72ef16eb7f76ac18 (diff)
downloadmana-4ecc89dcc6516b10c6dab8b79dcaa435ec9e1435.tar.gz
mana-4ecc89dcc6516b10c6dab8b79dcaa435ec9e1435.tar.bz2
mana-4ecc89dcc6516b10c6dab8b79dcaa435ec9e1435.tar.xz
mana-4ecc89dcc6516b10c6dab8b79dcaa435ec9e1435.zip
* Committing some cleanups by Doener
* Fixed some compiler warnings * Restored a USE_OPENGL check around OpenGL headers * Fixed error about FALSE not being defined * Fixed issue with font to become speechFont when the latter is not installed
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)