/// <summary> /// Prefix to Abrakam::WelcomeLayout::OnNewAccountButton /// </summary> public static bool OnNewAccountButton() { Abrakam.WelcomeLayout welcomeLayout = LayoutManager.WelcomeLayout; if (welcomeLayout == null) { return(true); } MobileFriendlyTextInput usernameField = welcomeLayout.GetPrivateField <MobileFriendlyTextInput>("userNameInputField"); if (usernameField == null) { return(true); } MobileFriendlyTextInput passwordField = welcomeLayout.GetPrivateField <MobileFriendlyTextInput>("passwordInputField"); if (passwordField == null) { return(true); } string error = GuiManager.CheckUsername(usernameField.text); if (error != null) { welcomeLayout.errorPanelLayout.DisplayErrorMessage(error); return(true); } if (passwordField.text.Length < 8) { welcomeLayout.errorPanelLayout.DisplayErrorMessage(LocalisationManager.GetLocalisedValue("PASSWORD_TOO_SHORT")); return(true); } return(false); }