summaryrefslogtreecommitdiff
path: root/src/gui/ok_dialog.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-13 02:55:05 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-13 02:55:05 +0000
commit682d6a9e44e583c088ed5970d69ef6bd9db7fd23 (patch)
tree73079cdd7d9b57d104c8db400f09aabc3d833122 /src/gui/ok_dialog.cpp
parent3657bf87641144b605d49767cf466f04242c29c9 (diff)
downloadmana-client-682d6a9e44e583c088ed5970d69ef6bd9db7fd23.tar.gz
mana-client-682d6a9e44e583c088ed5970d69ef6bd9db7fd23.tar.bz2
mana-client-682d6a9e44e583c088ed5970d69ef6bd9db7fd23.tar.xz
mana-client-682d6a9e44e583c088ed5970d69ef6bd9db7fd23.zip
Got rid of Allegro ok dialog completely. Now just the yes_no dialog remaining.
Diffstat (limited to 'src/gui/ok_dialog.cpp')
-rw-r--r--src/gui/ok_dialog.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/gui/ok_dialog.cpp b/src/gui/ok_dialog.cpp
index 54ddf3e9..9164cfa3 100644
--- a/src/gui/ok_dialog.cpp
+++ b/src/gui/ok_dialog.cpp
@@ -24,20 +24,21 @@
#include "ok_dialog.h"
#include "button.h"
-OkDialog::OkDialog(const std::string &title, const std::string &msg):
+OkDialog::OkDialog(const std::string &title, const std::string &msg,
+ gcn::ActionListener *listener):
Window(title, true)
{
- init(msg);
+ init(msg, listener);
}
OkDialog::OkDialog(Window *parent, const std::string &title,
- const std::string &msg):
+ const std::string &msg, gcn::ActionListener *listener):
Window(title, true, parent)
{
- init(msg);
+ init(msg, listener);
}
-void OkDialog::init(const std::string &msg)
+void OkDialog::init(const std::string &msg, gcn::ActionListener *listener)
{
userLabel = new gcn::Label(msg);
okButton = new Button("OK");
@@ -57,6 +58,9 @@ void OkDialog::init(const std::string &msg)
okButton->setEventId("ok");
okButton->addActionListener(this);
+ if (listener) {
+ okButton->addActionListener(listener);
+ }
add(userLabel);
add(okButton);