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;
        }
예제 #2
0
        private void showPrivate()
        {
            if (!_logger.canPrivate())
            {
                if (_logger.isUserBasic())
                {
                    if (GUILayout.Button("(" + SketchfabUI.ClickableTextColor("Upgrade to a paid account to set your model to private") + ")", _ui.SkfbClickableLabel, GUILayout.Height(20)))
                    {
                        Application.OpenURL(SketchfabPlugin.Urls.plans);
                    }
                }
                else
                {
                    if (GUILayout.Button("(" + SketchfabUI.ClickableTextColor("You cannot set any other model to private (limit reached)") + ")", _ui.SkfbClickableLabel, 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.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;
        }
예제 #3
0
        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("(" + SketchfabUI.ClickableTextColor("more info") + ")", _ui.SkfbClickableLabel, GUILayout.Height(20)))
            {
                Application.OpenURL(SketchfabPlugin.Urls.latestRelease);
            }
            GUILayout.FlexibleSpace();
            GUILayout.EndHorizontal();
        }