From 81cf85e9ec1d37dc6e8dd9883f42bb50dace9135 Mon Sep 17 00:00:00 2001 From: Björn Steinbrink Date: Thu, 9 Mar 2006 02:02:57 +0000 Subject: Made the Button ctor accept eventId and action listener. --- src/gui/ok_dialog.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/gui/ok_dialog.cpp') diff --git a/src/gui/ok_dialog.cpp b/src/gui/ok_dialog.cpp index 8d2ebc23..2f3f21c5 100644 --- a/src/gui/ok_dialog.cpp +++ b/src/gui/ok_dialog.cpp @@ -33,7 +33,7 @@ OkDialog::OkDialog(const std::string &title, const std::string &msg, Window(title, true, parent) { gcn::Label *textLabel = new gcn::Label(msg); - gcn::Button *okButton = new Button("Ok"); + gcn::Button *okButton = new Button("Ok", "ok", this); int w = textLabel->getWidth() + 20; int h = textLabel->getHeight() + 25 + okButton->getHeight(); @@ -47,9 +47,6 @@ OkDialog::OkDialog(const std::string &title, const std::string &msg, okButton->setPosition((w - okButton->getWidth()) / 2, h - 5 - okButton->getHeight()); - okButton->setEventId("ok"); - okButton->addActionListener(this); - add(textLabel); add(okButton); -- cgit v1.2.3-70-g09d2