diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-07 22:09:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-07 22:09:11 +0300 |
commit | b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2 (patch) | |
tree | ee27a5a1ace7e5dbc588466dc623013e4d5cea99 /src/gui/widgets/window.cpp | |
parent | 7d3059516fc25134d0d29b497e546f2846162399 (diff) | |
download | manaplus-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.tar.gz manaplus-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.tar.bz2 manaplus-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.tar.xz manaplus-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.zip |
Improve constructors in some classes.
Diffstat (limited to 'src/gui/widgets/window.cpp')
-rw-r--r-- | src/gui/widgets/window.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
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)); } |