summaryrefslogtreecommitdiff
path: root/src/gui/widgets/button.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-20 00:52:01 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-20 13:55:43 +0300
commit41adf71a823f475b7f12b00e06056b778311da84 (patch)
tree55925f737e884f756d05a71238f207c03070a7ad /src/gui/widgets/button.cpp
parent504219f9df4b9dda139dd832e263a136e51c4851 (diff)
downloadmanaplus-41adf71a823f475b7f12b00e06056b778311da84.tar.gz
manaplus-41adf71a823f475b7f12b00e06056b778311da84.tar.bz2
manaplus-41adf71a823f475b7f12b00e06056b778311da84.tar.xz
manaplus-41adf71a823f475b7f12b00e06056b778311da84.zip
Add palette inheritance to button class.
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),