public override void Draw(MonoBehaviour owner = null) { if (loading) { InitStyles(); loading = false; } usernameFieldID = GUIUtility.GetControlID(FocusType.Keyboard) + 1; username = GUI.TextField(usernameFieldRect, username, usernameStyle); passwordFieldID = GUIUtility.GetControlID(FocusType.Keyboard) + 1; if (keyboardFieldID == passwordFieldID || password != kDefaultPasswordText) { password = GUI.PasswordField(passwordFieldRect, password, '*', passwordStyle); } else { password = GUI.TextField(passwordFieldRect, password, passwordStyle); } confirmFieldID = GUIUtility.GetControlID(FocusType.Keyboard) + 1; if (keyboardFieldID == confirmFieldID || confirm != kDefaultConfirmText) { confirm = GUI.PasswordField(confirmFieldRect, confirm, '*', confirmStyle); } else { confirm = GUI.TextField(confirmFieldRect, confirm, confirmStyle); } emailFieldID = GUIUtility.GetControlID(FocusType.Keyboard) + 1; email = GUI.TextField(emailFieldRect, email, emailStyle); if (GUI.Button(submitButtonRect, "Submit", buttonStyle)) { ClearFocus(); ADAGEMenu.ShowPanel <ADAGESplashPanel>(); if (IsValid()) { ADAGE.RegisterPlayer(username, email, password, confirm); } } if (GUI.Button(backButtonRect, "Back", buttonStyle)) { ClearFocus(); ADAGEMenu.ShowLast(); } CheckFields(); }
public override void Draw(MonoBehaviour owner = null) { if (loading) { InitStyles(); CheckFields(); loading = false; } usernameFieldID = GUIUtility.GetControlID(FocusType.Keyboard) + 1; username = GUI.TextField(usernameFieldRect, username, usernameStyle); passwordFieldID = GUIUtility.GetControlID(FocusType.Keyboard) + 1; if (keyboardFieldID == passwordFieldID || password != kDefaultPasswordText) { password = GUI.PasswordField(passwordFieldRect, password, '*', passwordStyle); } else { password = GUI.TextField(passwordFieldRect, password, passwordStyle); } GUI.enabled = (password != kDefaultPasswordText && username != kDefaultUsernameText && password.Trim().Length != 0 && username.Trim().Length != 0); if (GUI.Button(loginButtonRect, "Login", buttonStyle)) { ClearFocus(); loginAttempts++; ADAGEMenu.ShowPanel <ADAGESplashPanel>(); ADAGE.LoginPlayer(username.Trim(), password.Trim()); } GUI.enabled = true; if (!isLocked) { if (GUI.Button(backButtonRect, "Back", buttonStyle)) { ClearFocus(); ADAGEMenu.ShowLast(); } } if (ADAGE.AllowFacebook) { if (GUI.Button(facebookButtonRect, "", imageButtonStyle)) { ClearFocus(); } } CheckFields(); }
public override void Draw(MonoBehaviour owner = null) { if (loading) { InitStyles(); loading = false; } if (cameraTexture != null) { GUI.DrawTexture(imagePanelRect, cameraTexture, ScaleMode.StretchToFill); } GUI.Label(labelRect, "Point your camera at the QR code"); if (!isLocked) { if (GUI.Button(backButtonRect, "Back", buttonStyle)) { ADAGEMenu.ShowLast(); } } }