summaryrefslogtreecommitdiff
path: root/src/guichan/widgets/button.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-05 21:48:30 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-05 21:48:30 +0300
commit6fee84f3838bdd900e8cfc4a1e4d7f15f35bd6ed (patch)
tree79a54d4c838c85df29b1b95702b71a95c43ceb5a /src/guichan/widgets/button.cpp
parentd1bb1b375d657f0821ccfebf18fa1c3873314690 (diff)
downloadmv-6fee84f3838bdd900e8cfc4a1e4d7f15f35bd6ed.tar.gz
mv-6fee84f3838bdd900e8cfc4a1e4d7f15f35bd6ed.tar.bz2
mv-6fee84f3838bdd900e8cfc4a1e4d7f15f35bd6ed.tar.xz
mv-6fee84f3838bdd900e8cfc4a1e4d7f15f35bd6ed.zip
Improve constructors in some classes.
Diffstat (limited to 'src/guichan/widgets/button.cpp')
-rw-r--r--src/guichan/widgets/button.cpp34
1 files changed, 21 insertions, 13 deletions
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();