From 34b19f52d2f4a0b8e7eecf0900d1760460390b9d Mon Sep 17 00:00:00 2001 From: Eugenio Favalli Date: Wed, 4 Jan 2006 20:28:57 +0000 Subject: Reverted r0nny changes, enabled 3 slots to create players, smoothed player deletion. --- src/gui/confirm_dialog.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/gui/confirm_dialog.cpp') diff --git a/src/gui/confirm_dialog.cpp b/src/gui/confirm_dialog.cpp index dc710961..59d48318 100644 --- a/src/gui/confirm_dialog.cpp +++ b/src/gui/confirm_dialog.cpp @@ -45,20 +45,20 @@ ConfirmDialog::ConfirmDialog(Window *parent, const std::string &title, void ConfirmDialog::init(const std::string &msg, gcn::ActionListener *listener) { - gcn::Label *userLabel = new gcn::Label(msg); - Button *yesButton = new Button("Yes"); - Button *noButton = new Button("No"); + textLabel = new gcn::Label(msg); + yesButton = new Button("Yes"); + noButton = new Button("No"); - int w = userLabel->getWidth() + 20; + int w = textLabel->getWidth() + 20; int inWidth = yesButton->getWidth() + noButton->getWidth() + 5; - int h = userLabel->getHeight() + 25 + yesButton->getHeight(); + int h = textLabel->getHeight() + 25 + yesButton->getHeight(); if (w < inWidth + 10) { w = inWidth + 10; } setContentSize(w, h); - userLabel->setPosition(10, 10); + textLabel->setPosition(10, 10); yesButton->setPosition( (w - inWidth) / 2, h - 5 - noButton->getHeight()); @@ -75,7 +75,7 @@ void ConfirmDialog::init(const std::string &msg, gcn::ActionListener *listener) noButton->addActionListener(listener); } - add(userLabel); + add(textLabel); add(yesButton); add(noButton); -- cgit v1.2.3-70-g09d2