summaryrefslogtreecommitdiff
path: root/src/guichan/widgets/button.cpp
diff options
context:
space:
mode:
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();