diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2006-01-04 20:28:57 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2006-01-04 20:28:57 +0000 |
commit | 34b19f52d2f4a0b8e7eecf0900d1760460390b9d (patch) | |
tree | 0e1ddf0575ec5780d988623daf4fc25d813fc1fd /src/gui/ok_dialog.cpp | |
parent | 180f39cb9da6e3169f95e9da5c8782c50f826af4 (diff) | |
download | mana-34b19f52d2f4a0b8e7eecf0900d1760460390b9d.tar.gz mana-34b19f52d2f4a0b8e7eecf0900d1760460390b9d.tar.bz2 mana-34b19f52d2f4a0b8e7eecf0900d1760460390b9d.tar.xz mana-34b19f52d2f4a0b8e7eecf0900d1760460390b9d.zip |
Reverted r0nny changes, enabled 3 slots to create players, smoothed player deletion.
Diffstat (limited to 'src/gui/ok_dialog.cpp')
-rw-r--r-- | src/gui/ok_dialog.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/ok_dialog.cpp b/src/gui/ok_dialog.cpp index 794bc723..aca42972 100644 --- a/src/gui/ok_dialog.cpp +++ b/src/gui/ok_dialog.cpp @@ -48,18 +48,18 @@ OkDialog::~OkDialog() void OkDialog::init(const std::string &msg, gcn::ActionListener *listener) { - gcn::Label *userLabel = new gcn::Label(msg); - Button *okButton = new Button("OK"); + textLabel = new gcn::Label(msg); + okButton = new Button("Ok"); - int w = userLabel->getWidth() + 20; - int h = userLabel->getHeight() + 25 + okButton->getHeight(); + int w = textLabel->getWidth() + 20; + int h = textLabel->getHeight() + 25 + okButton->getHeight(); if (okButton->getWidth() + 10 > w) { w = okButton->getWidth() + 10; } setContentSize(w, h); - userLabel->setPosition(10, 10); + textLabel->setPosition(10, 10); okButton->setPosition((w - okButton->getWidth()) / 2, h - 5 - okButton->getHeight()); @@ -69,7 +69,7 @@ void OkDialog::init(const std::string &msg, gcn::ActionListener *listener) okButton->addActionListener(listener); } - add(userLabel); + add(textLabel); add(okButton); setLocationRelativeTo(getParent()); |