void OnGUI() { if (initialized) { EditorGUILayout.LabelField(tokenMethod, EditorStyles.whiteLargeLabel); username = EditorGUILayout.TextField(tokenMethod.usernameName, username); password = EditorGUILayout.PasswordField(tokenMethod.passwordName, password); if (GUILayout.Button("Login")) { if (tokenMethod.action(registry, username, password)) { CloseWindow(); } } if (GUILayout.Button("Close")) { CloseWindow(); } if (!string.IsNullOrEmpty(error)) { EditorGUILayout.HelpBox(error, MessageType.Error); } } }
void OnGUI() { if (initialized) { EditorGUILayout.LabelField(tokenMethod, EditorStyles.whiteLargeLabel); username = EditorGUILayout.TextField(tokenMethod.usernameName, username); password = EditorGUILayout.PasswordField(tokenMethod.passwordName, password); if (GUILayout.Button("Login")) { tokenMethod.action(registry, username, password); CloseWindow(); } if (GUILayout.Button("Close")) { CloseWindow(); } } }