diff options
Diffstat (limited to 'src/gui/button.cpp')
-rw-r--r-- | src/gui/button.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/button.cpp b/src/gui/button.cpp index 8e57181e..9d01095b 100644 --- a/src/gui/button.cpp +++ b/src/gui/button.cpp @@ -39,7 +39,8 @@ ImageRect Button::button[4]; int Button::mInstances = 0; -Button::Button(const std::string& caption): +Button::Button(const std::string& caption, const std::string &eventId, + gcn::ActionListener *listener): gcn::Button(caption) { setBorderSize(0); @@ -74,6 +75,10 @@ Button::Button(const std::string& caption): } mInstances++; + setEventId(eventId); + if (listener) { + addActionListener(listener); + } } Button::~Button() |