From 6fee84f3838bdd900e8cfc4a1e4d7f15f35bd6ed Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 5 Sep 2012 21:48:30 +0300 Subject: Improve constructors in some classes. --- src/guichan/widgets/window.cpp | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'src/guichan/widgets/window.cpp') diff --git a/src/guichan/widgets/window.cpp b/src/guichan/widgets/window.cpp index 1a2279811..e82758e5f 100644 --- a/src/guichan/widgets/window.cpp +++ b/src/guichan/widgets/window.cpp @@ -58,28 +58,32 @@ namespace gcn { Window::Window() : + Container(), + MouseListener(), + mAlignment(Graphics::CENTER), + mPadding(2), + mTitleBarHeight(16), + mMovable(true), + mOpaque(true), mMoved(false) { - setFrameSize(1); - setPadding(2); - setTitleBarHeight(16); - setAlignment(Graphics::CENTER); + mFrameSize = 1; addMouseListener(this); - setMovable(true); - setOpaque(true); } Window::Window(const std::string& caption) : + Container(), + MouseListener(), + mCaption(caption), + mAlignment(Graphics::CENTER), + mPadding(2), + mTitleBarHeight(16), + mMovable(true), + mOpaque(true), mMoved(false) { - setCaption(caption); - setFrameSize(1); - setPadding(2); - setTitleBarHeight(16); - setAlignment(Graphics::CENTER); + mFrameSize = 1; addMouseListener(this); - setMovable(true); - setOpaque(true); } Window::~Window() -- cgit v1.2.3-70-g09d2