diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/char_select.cpp | 4 | ||||
-rw-r--r-- | src/gui/char_server.cpp | 3 | ||||
-rw-r--r-- | src/gui/confirm_dialog.cpp | 3 | ||||
-rw-r--r-- | src/gui/confirm_dialog.h | 2 | ||||
-rw-r--r-- | src/gui/login.cpp | 1 | ||||
-rw-r--r-- | src/gui/ok_dialog.cpp | 3 | ||||
-rw-r--r-- | src/gui/ok_dialog.h | 2 | ||||
-rw-r--r-- | src/gui/register.cpp | 4 | ||||
-rw-r--r-- | src/gui/window.cpp | 3 | ||||
-rw-r--r-- | src/gui/window.h | 3 |
10 files changed, 20 insertions, 8 deletions
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp index fa4c0241..d91019e3 100644 --- a/src/gui/char_select.cpp +++ b/src/gui/char_select.cpp @@ -121,8 +121,9 @@ CharSelectDialog::CharSelectDialog(Network *network, add(mJobLevelLabel); add(mMoneyLabel); - mSelectButton->requestFocus(); setLocationRelativeTo(getParent()); + setVisible(true); + mSelectButton->requestFocus(); updatePlayerInfo(); } @@ -309,6 +310,7 @@ CharCreateDialog::CharCreateDialog(Window *parent, int slot, Network *network, add(mCancelButton); setLocationRelativeTo(getParent()); + setVisible(true); } void CharCreateDialog::action(const std::string& eventId, gcn::Widget* widget) diff --git a/src/gui/char_server.cpp b/src/gui/char_server.cpp index 87ed9c17..302caf62 100644 --- a/src/gui/char_server.cpp +++ b/src/gui/char_server.cpp @@ -87,8 +87,9 @@ ServerSelectDialog::ServerSelectDialog(LoginData *loginData): mServerList->setSelected(1); } - mOkButton->requestFocus(); setLocationRelativeTo(getParent()); + setVisible(true); + mOkButton->requestFocus(); } ServerSelectDialog::~ServerSelectDialog() diff --git a/src/gui/confirm_dialog.cpp b/src/gui/confirm_dialog.cpp index 3bd15589..5a70544f 100644 --- a/src/gui/confirm_dialog.cpp +++ b/src/gui/confirm_dialog.cpp @@ -61,10 +61,11 @@ ConfirmDialog::ConfirmDialog(const std::string &title, const std::string &msg, setLocationRelativeTo(getParent()); getParent()->moveToTop(this); } + setVisible(true); yesButton->requestFocus(); } -void ConfirmDialog::action(const std::string& eventId, gcn::Widget* widget) +void ConfirmDialog::action(const std::string &eventId, gcn::Widget *widget) { // Proxy button events to our listeners ActionListenerIterator i; diff --git a/src/gui/confirm_dialog.h b/src/gui/confirm_dialog.h index 1c206b03..771ecc36 100644 --- a/src/gui/confirm_dialog.h +++ b/src/gui/confirm_dialog.h @@ -47,7 +47,7 @@ class ConfirmDialog : public Window, public gcn::ActionListener { /** * Called when receiving actions from the widgets. */ - void action(const std::string& eventId, gcn::Widget* widget); + void action(const std::string &eventId, gcn::Widget *widget); }; #endif diff --git a/src/gui/login.cpp b/src/gui/login.cpp index 675de078..97814360 100644 --- a/src/gui/login.cpp +++ b/src/gui/login.cpp @@ -112,6 +112,7 @@ LoginDialog::LoginDialog(LoginData *loginData): add(mRegisterButton); setLocationRelativeTo(getParent()); + setVisible(true); if (mUserField->getText().empty()) { mUserField->requestFocus(); diff --git a/src/gui/ok_dialog.cpp b/src/gui/ok_dialog.cpp index e527339e..4f9623d7 100644 --- a/src/gui/ok_dialog.cpp +++ b/src/gui/ok_dialog.cpp @@ -51,10 +51,11 @@ OkDialog::OkDialog(const std::string &title, const std::string &msg, add(okButton); setLocationRelativeTo(getParent()); + setVisible(true); okButton->requestFocus(); } -void OkDialog::action(const std::string& eventId, gcn::Widget* widget) +void OkDialog::action(const std::string &eventId, gcn::Widget *widget) { // Proxy button events to our listeners ActionListenerIterator i; diff --git a/src/gui/ok_dialog.h b/src/gui/ok_dialog.h index 06f703cc..8ae08955 100644 --- a/src/gui/ok_dialog.h +++ b/src/gui/ok_dialog.h @@ -46,7 +46,7 @@ class OkDialog : public Window, public gcn::ActionListener { /** * Called when receiving actions from the widgets. */ - void action(const std::string& eventId, gcn::Widget* widget); + void action(const std::string &eventId, gcn::Widget *widget); }; #endif diff --git a/src/gui/register.cpp b/src/gui/register.cpp index 1c1f0a26..458452eb 100644 --- a/src/gui/register.cpp +++ b/src/gui/register.cpp @@ -83,7 +83,8 @@ RegisterDialog::RegisterDialog(LoginData *loginData): mFemaleButton->setPosition(width - mFemaleButton->getWidth() - 10, mConfirmField->getY() + mConfirmField->getHeight() + 7); - mMaleButton->setPosition(mFemaleButton->getX() - mMaleButton->getWidth() - 5, + mMaleButton->setPosition( + mFemaleButton->getX() - mMaleButton->getWidth() - 5, mFemaleButton->getY()); mRegisterButton->setPosition(5, height - mRegisterButton->getHeight() - 5); @@ -104,6 +105,7 @@ RegisterDialog::RegisterDialog(LoginData *loginData): add(mCancelButton); setLocationRelativeTo(getParent()); + setVisible(true); mUserField->requestFocus(); mUserField->setCaretPosition(mUserField->getText().length()); diff --git a/src/gui/window.cpp b/src/gui/window.cpp index fe23c775..51386eed 100644 --- a/src/gui/window.cpp +++ b/src/gui/window.cpp @@ -115,6 +115,9 @@ Window::Window(const std::string& caption, bool modal, Window *parent): { requestModalFocus(); } + + // Windows are invisible by default + setVisible(false); } Window::~Window() diff --git a/src/gui/window.h b/src/gui/window.h index 51c876e3..158035c0 100644 --- a/src/gui/window.h +++ b/src/gui/window.h @@ -36,7 +36,8 @@ class WindowContainer; /** - * A window. This window can be dragged around and has a title bar. + * A window. This window can be dragged around and has a title bar. Windows are + * invisible by default. * * \ingroup GUI */ |