private void showLoginUi() { GUILayout.Label("Log in with your Sketchfab account", EditorStyles.centeredGreyMiniLabel); user_name = EditorGUILayout.TextField("Email", user_name); user_password = EditorGUILayout.PasswordField("Password", user_password); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (GUILayout.Button(SketchfabPlugin.ClickableTextColor("Create an account"), SketchfabPlugin.SkfbClickableLabel, GUILayout.Height(20))) { Application.OpenURL(SketchfabPlugin.Urls.createAccount); } if (GUILayout.Button(SketchfabPlugin.ClickableTextColor("Reset your password"), SketchfabPlugin.SkfbClickableLabel, GUILayout.Height(20))) { Application.OpenURL(SketchfabPlugin.Urls.resetPassword); } if (GUILayout.Button(SketchfabPlugin.ClickableTextColor("Report an issue"), SketchfabPlugin.SkfbClickableLabel, GUILayout.Height(20))) { Application.OpenURL(SketchfabPlugin.Urls.reportAnIssue); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (GUILayout.Button("Login", GUILayout.Width(150), GUILayout.Height(25))) { _api.authenticateUser(user_name, user_password); EditorPrefs.SetString(usernameEditorKey, user_name); } GUILayout.EndHorizontal(); }
private void showOptions() { GUILayout.Label("Options", EditorStyles.boldLabel); GUILayout.BeginHorizontal(); opt_exportAnimation = EditorGUILayout.Toggle("Export animation (beta)", opt_exportAnimation); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); opt_exportSelection = EditorGUILayout.Toggle("Export selection", opt_exportSelection); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); param_autopublish = EditorGUILayout.Toggle("Publish immediately ", param_autopublish); if (GUILayout.Button("(" + SketchfabPlugin.ClickableTextColor("more info") + ")", SketchfabPlugin.SkfbClickableLabel, GUILayout.Height(20))) { Application.OpenURL(SketchfabPlugin.Urls.latestRelease); } GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); }
private void showPrivateSetting() { GUILayout.Label("Set the model to Private", EditorStyles.centeredGreyMiniLabel); if (_api.getUserCanPrivate()) { EditorGUILayout.BeginVertical("Box"); GUILayout.BeginHorizontal(); param_private = EditorGUILayout.Toggle("Private model", param_private); if (GUILayout.Button("( " + SketchfabPlugin.ClickableTextColor("more info") + ")", SketchfabPlugin.SkfbClickableLabel, GUILayout.Height(20))) { Application.OpenURL(SketchfabPlugin.Urls.privateInfo); } GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUI.enabled = param_private; GUILayout.Label("Password"); param_password = EditorGUILayout.TextField(param_password); EditorGUILayout.EndVertical(); GUI.enabled = true; } else { if (_api.getCurrentUserPlanLabel() == "BASIC") { if (GUILayout.Button("(" + SketchfabPlugin.ClickableTextColor("Upgrade to a paid account to set your model to private") + ")", SketchfabPlugin.SkfbClickableLabel, GUILayout.Height(20))) { Application.OpenURL(SketchfabPlugin.Urls.plans); } } else { if (GUILayout.Button("(" + SketchfabPlugin.ClickableTextColor("You cannot set any other model to private (limit reached)") + ")", SketchfabPlugin.SkfbClickableLabel, GUILayout.Height(20))) { Application.OpenURL(SketchfabPlugin.Urls.plans); } } } }