Fixed registration dialog bug and changed event checking in online screen
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/uni@13563 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
b3a905dcc2
commit
5fa970b517
@ -40,7 +40,7 @@ RegistrationDialog::RegistrationDialog() :
|
||||
{
|
||||
m_sign_up_request = NULL;
|
||||
m_self_destroy = false;
|
||||
m_show_registration_input = true;
|
||||
m_show_registration_input = false;
|
||||
m_show_registration_terms = false;
|
||||
m_show_registration_info = false;
|
||||
m_username = "";
|
||||
@ -49,6 +49,7 @@ RegistrationDialog::RegistrationDialog() :
|
||||
m_password = "";
|
||||
m_password_confirm = "";
|
||||
m_agreement = false;
|
||||
showRegistrationInput();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@ -62,8 +63,9 @@ RegistrationDialog::~RegistrationDialog()
|
||||
|
||||
void RegistrationDialog::showRegistrationInput()
|
||||
{
|
||||
if(isInited())
|
||||
clearWindow();
|
||||
m_show_registration_input = false;
|
||||
clearWindow();
|
||||
m_phase = Input;
|
||||
loadFromFile("online/registration_input.stkgui");
|
||||
|
||||
@ -110,7 +112,8 @@ void RegistrationDialog::showRegistrationInput()
|
||||
void RegistrationDialog::showRegistrationTerms()
|
||||
{
|
||||
m_show_registration_terms = false;
|
||||
clearWindow();
|
||||
if(isInited())
|
||||
clearWindow();
|
||||
m_phase = Terms;
|
||||
loadFromFile("online/registration_terms.stkgui");
|
||||
|
||||
@ -154,7 +157,8 @@ void RegistrationDialog::showRegistrationTerms()
|
||||
void RegistrationDialog::showRegistrationInfo()
|
||||
{
|
||||
m_show_registration_info = false;
|
||||
clearWindow();
|
||||
if(isInited())
|
||||
clearWindow();
|
||||
m_phase = Info;
|
||||
loadFromFile("online/registration_info.stkgui");
|
||||
|
||||
|
@ -181,11 +181,11 @@ void OnlineScreen::eventCallback(Widget* widget, const std::string& name, const
|
||||
if (ribbon == NULL) return;
|
||||
std::string selection = ribbon->getSelectionIDString(PLAYER_ID_GAME_MASTER);
|
||||
|
||||
if (selection == "sign_in")
|
||||
if (selection == m_sign_in_widget->m_properties[PROP_ID])
|
||||
{
|
||||
new LoginDialog(LoginDialog::Normal);
|
||||
}
|
||||
else if (selection == "sign_out")
|
||||
else if (selection == m_sign_out_widget->m_properties[PROP_ID])
|
||||
{
|
||||
CurrentUser::get()->requestSignOut();
|
||||
}
|
||||
@ -194,19 +194,19 @@ void OnlineScreen::eventCallback(Widget* widget, const std::string& name, const
|
||||
ProfileManager::get()->setVisiting(CurrentUser::get()->getID());
|
||||
StateManager::get()->pushScreen(OnlineProfileOverview::getInstance());
|
||||
}
|
||||
else if (selection == "register")
|
||||
else if (selection == m_register_widget->m_properties[PROP_ID])
|
||||
{
|
||||
new RegistrationDialog();
|
||||
}
|
||||
else if (selection == "find_server")
|
||||
else if (selection == m_find_server_widget->m_properties[PROP_ID])
|
||||
{
|
||||
StateManager::get()->pushScreen(ServerSelection::getInstance());
|
||||
}
|
||||
else if (selection == "create_server")
|
||||
else if (selection == m_create_server_widget->m_properties[PROP_ID])
|
||||
{
|
||||
StateManager::get()->pushScreen(CreateServerScreen::getInstance());
|
||||
}
|
||||
else if (selection == "quick_play")
|
||||
else if (selection == m_quick_play_widget->m_properties[PROP_ID])
|
||||
{
|
||||
//FIXME temporary and the request join + join sequence should be placed in one method somewhere
|
||||
// refresh server list
|
||||
|
Loading…
x
Reference in New Issue
Block a user