From b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 7 Sep 2012 22:09:11 +0300 Subject: Improve constructors in some classes. --- src/gui/widgets/window.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/gui/widgets/window.cpp') diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index 58247870f..f2266dfd1 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -46,8 +46,10 @@ int Window::instances = 0; int Window::mouseResize = 0; Window::Window(const std::string &caption, const bool modal, - Window *const parent, std::string skin): + Window *const parent, std::string skin) : gcn::Window(caption), + gcn::WidgetListener(), + mSkin(nullptr), mGrip(nullptr), mParent(parent), mLayout(nullptr), @@ -64,12 +66,17 @@ Window::Window(const std::string &caption, const bool modal, mMinWinHeight(40), mMaxWinWidth(mainGraphics->mWidth), mMaxWinHeight(mainGraphics->mHeight), + mDefaultX(0), + mDefaultY(0), + mDefaultWidth(0), + mDefaultHeight(0), mVertexes(new GraphicsVertexes()), mCaptionOffsetX(7), mCaptionOffsetY(5), mCaptionAlign(gcn::Graphics::LEFT), mTitlePadding(4), - mRedraw(true) + mRedraw(true), + mCaptionFont(getFont()) { logger->log("Window::Window(\"%s\")", caption.c_str()); @@ -108,10 +115,6 @@ Window::Window(const std::string &caption, const bool modal, } } } - else - { - mSkin = nullptr; - } // Add this window to the window container windowContainer->add(this); @@ -126,7 +129,6 @@ Window::Window(const std::string &caption, const bool modal, setVisible(false); addWidgetListener(this); - mCaptionFont = getFont(); setForegroundColor(Theme::getThemeColor(Theme::WINDOW)); } -- cgit v1.2.3-70-g09d2