public SplineEditorToolbar(SplineEditor edit, SplineComputer comp)
        {
            editor   = edit;
            computer = comp;
            Texture2D tex = SplineEditorGUI.LoadTexture("presets.png");

            if (tex != null)
            {
                presetButtonContent.image = tex; presetButtonContent.text = "";
            }

            tex = SplineEditorGUI.LoadTexture("move.png");
            if (tex != null)
            {
                moveButtonContent.image = tex; moveButtonContent.text = "";
            }

            tex = SplineEditorGUI.LoadTexture("rotate.png");
            if (tex != null)
            {
                rotateButtonContent.image = tex; rotateButtonContent.text = "";
            }

            tex = SplineEditorGUI.LoadTexture("scale.png");
            if (tex != null)
            {
                scaleButtonContent.image = tex; scaleButtonContent.text = "";
            }

            tex = SplineEditorGUI.LoadTexture("normals.png");
            if (tex != null)
            {
                normalsButtonContent.image = tex; normalsButtonContent.text = "";
            }

            tex = SplineEditorGUI.LoadTexture("mirror.png");
            if (tex != null)
            {
                mirrorButtonContent.image = tex; mirrorButtonContent.text = "";
            }

            tex = SplineEditorGUI.LoadTexture("merge.png");
            if (tex != null)
            {
                mergeButtonContent.image = tex; mergeButtonContent.text = "";
            }
        }
Example #2
0
        public void init()
        {
            minSize = maxSize = new Vector2(450, 500);
#if UNITY_5_0
            title = "Dreamteck Splines " + PluginInfo.version;
#else
            titleContent = new GUIContent("Dreamteck Splines " + PluginInfo.version);
#endif
            position = new Rect(Screen.width / 2f - 200, Screen.height / 2f - 200, 450, 500);

            changeLogPanel               = new WindowPanel();
            supportPanel                 = new WindowPanel();
            homePanel                    = new WindowPanel();
            learnPanel                   = new WindowPanel();
            changeLogPanel.size          = supportPanel.size = homePanel.size = learnPanel.size = new Vector2(maxSize.x, maxSize.y - 82);
            changeLogPanel.slideDuration = supportPanel.slideDuration = homePanel.slideDuration = learnPanel.slideDuration = 0.25f;
            homePanel.SetState(true, false);
            header        = SplineEditorGUI.LoadTexture("plugin_header.png");
            changelogIcon = SplineEditorGUI.LoadTexture("changelog.png");
            learnIcon     = SplineEditorGUI.LoadTexture("get_started.png");
            supportIcon   = SplineEditorGUI.LoadTexture("support.png");
            rateIcon      = SplineEditorGUI.LoadTexture("rate.png");
            pdfIcon       = SplineEditorGUI.LoadTexture("pdf.png");
            videoIcon     = SplineEditorGUI.LoadTexture("video_tutorials.png");

            string path = Application.dataPath + "/Dreamteck/Splines/Editor/";
            if (Directory.Exists(path))
            {
                if (File.Exists(path + "changelog.txt"))
                {
                    string[] lines = File.ReadAllLines(path + "changelog.txt");
                    changelogText = "";
                    for (int i = 0; i < lines.Length; i++)
                    {
                        changelogText += lines[i] + "\r\n";
                    }
                }
            }
        }