private void displayImportButton() { GUILayout.BeginHorizontal(); Color old = GUI.color; GUI.color = SketchfabUI.SKFB_BLUE; GUI.contentColor = Color.white; GUI.enabled = GLTFUtils.isFolderInProjectDirectory(_importDirectory) && File.Exists(_importFilePath); if (GUILayout.Button("IMPORT", _ui.getSketchfabButton())) { processImportButton(); } GUI.color = old; GUI.enabled = true; GUILayout.EndHorizontal(); }
private void showPrivate() { if (!_logger.canPrivate()) { if (_logger.isUserBasic()) { GUILayout.BeginHorizontal(); GUIContent content = new GUIContent("features", SketchfabUI.getPlanIcon("pro")); GUILayout.Label(content, EditorStyles.boldLabel, GUILayout.Height(18)); Color old = GUI.color; GUI.color = SketchfabUI.SKFB_BLUE; if (GUILayout.Button("<color=" + Color.white + ">UPGRADE</color>", _ui.getSketchfabButton(), GUILayout.Height(18))) { Application.OpenURL(SketchfabPlugin.Urls.plans); } GUI.color = old; GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); } else { if (GUILayout.Button("(" + SketchfabUI.ClickableTextColor("You cannot set any other model to private (limit reached)") + ")", _ui.getSketchfabClickableLabel(), GUILayout.Height(20))) { Application.OpenURL(SketchfabPlugin.Urls.plans); } } } else { GUILayout.Label("Set the model to Private", EditorStyles.centeredGreyMiniLabel); } GUI.enabled = _logger.canPrivate(); EditorGUILayout.BeginVertical("Box"); GUILayout.BeginHorizontal(); param_private = EditorGUILayout.Toggle("Private model", param_private); if (GUILayout.Button("( " + SketchfabUI.ClickableTextColor("more info") + ")", _ui.getSketchfabClickableLabel(), 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; }