Added missing calls to Screen::init().

This commit is contained in:
hiker 2014-01-22 16:54:57 +11:00
parent 476d7db741
commit c72544b49d
3 changed files with 7 additions and 1 deletions

View File

@ -37,6 +37,7 @@ GuestLoginScreen::GuestLoginScreen() : Screen("online/guest_login.stkgui")
*/
void GuestLoginScreen::init()
{
Screen::init();
RibbonWidget* tabs = this->getWidget<RibbonWidget>("login_tabs");
if (tabs) tabs->select( "tab_guest_login", PLAYER_ID_GAME_MASTER );
} // init

View File

@ -45,6 +45,7 @@ LoginScreen::LoginScreen() : Screen("online/login.stkgui")
// -----------------------------------------------------------------------------
void LoginScreen::init()
{
Screen::init();
// Make sure this tab is actually focused.
RibbonWidget* tabs = this->getWidget<RibbonWidget>("login_tabs");
if (tabs) tabs->select( "tab_login", PLAYER_ID_GAME_MASTER );
@ -62,7 +63,7 @@ void LoginScreen::init()
// As default don't select 'remember'
getWidget<CheckBoxWidget>("remember")->setState(false);
} // loadedFromFile
} // init
// -----------------------------------------------------------------------------
/** Collects the data entered into the gui and submits a login request.

View File

@ -46,6 +46,7 @@ RegisterScreen::RegisterScreen() : Screen("online/register.stkgui")
// -----------------------------------------------------------------------------
void RegisterScreen::init()
{
Screen::init();
// Make sure this tab is actually focused.
RibbonWidget* tabs = this->getWidget<RibbonWidget>("login_tabs");
if (tabs) tabs->select( "tab_register", PLAYER_ID_GAME_MASTER );
@ -65,6 +66,9 @@ void RegisterScreen::init()
} // init
// -----------------------------------------------------------------------------
/** Handles the actual registration process. It does some tests on id, password
* and email address, then submits a corresponding request.
*/
void RegisterScreen::doRegister()
{
core::stringw username = getWidget<TextBoxWidget>("username")->getText().trim();