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/button.cpp | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) (limited to 'src/guichan/widgets/button.cpp') diff --git a/src/guichan/widgets/button.cpp b/src/guichan/widgets/button.cpp index f30c890b4..69affd4b7 100644 --- a/src/guichan/widgets/button.cpp +++ b/src/guichan/widgets/button.cpp @@ -59,12 +59,16 @@ namespace gcn { - Button::Button() - : mHasMouse(false), - mKeyPressed(false), - mMousePressed(false), - mAlignment(Graphics::CENTER), - mSpacing(4) + Button::Button() : + Widget(), + MouseListener(), + KeyListener(), + FocusListener(), + mHasMouse(false), + mKeyPressed(false), + mMousePressed(false), + mAlignment(Graphics::CENTER), + mSpacing(4) { setFocusable(true); adjustSize(); @@ -75,13 +79,17 @@ namespace gcn addFocusListener(this); } - Button::Button(const std::string& caption) - : mCaption(caption), - mHasMouse(false), - mKeyPressed(false), - mMousePressed(false), - mAlignment(Graphics::CENTER), - mSpacing(4) + Button::Button(const std::string& caption) : + Widget(), + MouseListener(), + KeyListener(), + FocusListener(), + mCaption(caption), + mHasMouse(false), + mKeyPressed(false), + mMousePressed(false), + mAlignment(Graphics::CENTER), + mSpacing(4) { setFocusable(true); adjustSize(); -- cgit v1.2.3-70-g09d2