diff options
Diffstat (limited to 'src/gui/charselectdialog.cpp')
-rw-r--r-- | src/gui/charselectdialog.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/charselectdialog.cpp b/src/gui/charselectdialog.cpp index fd9eb1e88..f87bb6b93 100644 --- a/src/gui/charselectdialog.cpp +++ b/src/gui/charselectdialog.cpp @@ -153,7 +153,7 @@ CharSelectDialog::CharSelectDialog(LoginData *const data): mDeleteDialog(nullptr), mDeleteIndex(-1) { - setCloseButton(false); + setCloseButton(true); const int optionalActions = Net::getLoginHandler() ->supportedOptionalActions(); @@ -250,7 +250,7 @@ void CharSelectDialog::action(const gcn::ActionEvent &event) } else if (eventId == "switch") { - Client::setState(STATE_SWITCH_LOGIN); + close(); } else if (eventId == "change_password") { @@ -557,6 +557,12 @@ bool CharSelectDialog::selectByName(const std::string &name, return false; } +void CharSelectDialog::close() +{ + Client::setState(STATE_SWITCH_LOGIN); + Window::close(); +} + CharacterDisplay::CharacterDisplay(const Widget2 *const widget, CharSelectDialog *const charSelectDialog) : |