예제 #1
0
        private void showPrivate()
        {
            if (!_logger.canPrivate())
            {
                if (_logger.isUserBasic())
                {
                    GUILayout.BeginHorizontal();
                    GUILayout.BeginVertical();
                    GUILayout.FlexibleSpace();
                    GUIContent content = new GUIContent(" features", SketchfabUI.getPlanIcon("pro"));
                    GUILayout.Label(content, EditorStyles.boldLabel, GUILayout.Height(12));
                    GUILayout.FlexibleSpace();
                    GUILayout.EndVertical();
                    GUILayout.BeginVertical();
                    GUILayout.FlexibleSpace();
                    if (GUILayout.Button("Upgrade your account", GUILayout.Height(18)))
                    {
                        Application.OpenURL(SketchfabPlugin.Urls.plans);
                    }
                    GUILayout.FlexibleSpace();
                    GUILayout.EndVertical();
                    GUILayout.FlexibleSpace();
                    GUILayout.EndHorizontal();
                }
                else
                {
                    if (GUILayout.Button("(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("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;
        }