summaryrefslogtreecommitdiff
path: root/src/gui/widgets/button.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/button.cpp')
-rw-r--r--src/gui/widgets/button.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index 9b0f0578f..f157f1096 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -64,9 +64,9 @@ static std::string const data[BUTTON_COUNT] =
Skin *Button::button[BUTTON_COUNT];
-Button::Button() :
+Button::Button(const Widget2 *const widget) :
gcn::Button(),
- Widget2(),
+ Widget2(widget),
gcn::WidgetListener(),
mDescription(""), mClickCount(0),
mTag(0),
@@ -86,10 +86,11 @@ Button::Button() :
adjustSize();
}
-Button::Button(const std::string &caption, const std::string &actionEventId,
+Button::Button(const Widget2 *const widget,
+ const std::string &caption, const std::string &actionEventId,
gcn::ActionListener *const listener) :
gcn::Button(caption),
- Widget2(),
+ Widget2(widget),
gcn::WidgetListener(),
mDescription(""),
mClickCount(0),
@@ -114,12 +115,13 @@ Button::Button(const std::string &caption, const std::string &actionEventId,
addActionListener(listener);
}
-Button::Button(const std::string &caption, const std::string &imageName,
+Button::Button(const Widget2 *const widget,
+ const std::string &caption, const std::string &imageName,
const int imageWidth, const int imageHeight,
const std::string &actionEventId,
gcn::ActionListener *const listener) :
gcn::Button(caption),
- Widget2(),
+ Widget2(widget),
gcn::WidgetListener(),
mDescription(""),
mClickCount(0),
@@ -145,12 +147,12 @@ Button::Button(const std::string &caption, const std::string &imageName,
addActionListener(listener);
}
-Button::Button(const std::string &imageName,
+Button::Button(const Widget2 *const widget, const std::string &imageName,
const int imageWidth, const int imageHeight,
const std::string &actionEventId,
gcn::ActionListener *const listener) :
gcn::Button(""),
- Widget2(),
+ Widget2(widget),
gcn::WidgetListener(),
mDescription(""),
mClickCount(0),