summaryrefslogtreecommitdiff
path: root/src/gui/ok_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/ok_dialog.cpp')
-rw-r--r--src/gui/ok_dialog.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gui/ok_dialog.cpp b/src/gui/ok_dialog.cpp
index d3e7bec6..f1a97b49 100644
--- a/src/gui/ok_dialog.cpp
+++ b/src/gui/ok_dialog.cpp
@@ -1,9 +1,8 @@
/*
- * Aethyra
+ * The Mana World
* Copyright (C) 2004 The Mana World Development Team
*
- * This file is part of Aethyra based on original code
- * from The Mana World.
+ * This file is part of The Mana World.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -34,12 +33,12 @@ OkDialog::OkDialog(const std::string &title, const std::string &msg,
Window *parent):
Window(title, true, parent)
{
- mTextBox = new TextBox();
+ mTextBox = new TextBox;
mTextBox->setEditable(false);
mTextBox->setOpaque(false);
mTextArea = new ScrollArea(mTextBox);
- okButton = new Button(_("Ok"), "ok", this);
+ gcn::Button *okButton = new Button(_("Ok"), "ok", this);
mTextArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
mTextArea->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
@@ -75,7 +74,7 @@ OkDialog::OkDialog(const std::string &title, const std::string &msg,
add(mTextArea);
add(okButton);
- setLocationRelativeTo(getParent());
+ center();
setVisible(true);
okButton->requestFocus();
}