Exemplo n.º 1
0
    public FilterMode filterMode       = FilterMode.Bilinear; //default

        #if UNITY_EDITOR
    public void DrawCustomInspector(SuperTextMesh stm)
    {
        var serializedData = new SerializedObject(this);

        serializedData.Update();
        //gather parts for this data:
        SerializedProperty font       = serializedData.FindProperty("font");
        SerializedProperty quality    = serializedData.FindProperty("quality");
        SerializedProperty filterMode = serializedData.FindProperty("filterMode");

        //Title bar:
        STMCustomInspectorTools.DrawTitleBar(this, stm);
        //the rest:
        EditorGUILayout.PropertyField(font);
        if (this.font != null)
        {
            if (!this.font.dynamic)
            {
                EditorGUI.BeginDisabledGroup(!this.font.dynamic);
                this.quality = EditorGUILayout.IntSlider("Quality", this.font.fontSize, 1, 512);
                EditorGUI.EndDisabledGroup();
            }
            else
            {
                EditorGUILayout.PropertyField(quality);
            }
            EditorGUILayout.PropertyField(filterMode);
        }
        EditorGUILayout.Space();         //////////////////SPACE
        if (this != null)
        {
            serializedData.ApplyModifiedProperties();                     //since break; cant be called
        }
    }
Exemplo n.º 2
0
    public void DrawCustomInspector(SuperTextMesh stm)
    {
        Undo.RecordObject(this, "Edited STM Jitter Data");
        var serializedData = new SerializedObject(this);

        serializedData.Update();
        //gather parts for this data:
        SerializedProperty amount          = serializedData.FindProperty("amount");
        SerializedProperty perlin          = serializedData.FindProperty("perlin");
        SerializedProperty perlinTimeMulti = serializedData.FindProperty("perlinTimeMulti");
        //SerializedProperty distance = serializedData.FindProperty("distance");
        //SerializedProperty distanceOverTime = serializedData.FindProperty("distanceOverTime");
        SerializedProperty distanceOverTimeMulti = serializedData.FindProperty("distanceOverTimeMulti");

        //Title bar:
        STMCustomInspectorTools.DrawTitleBar(this, stm);
        //the rest:
        EditorGUILayout.PropertyField(amount);
        EditorGUILayout.PropertyField(perlin);
        if (perlin.boolValue)
        {
            EditorGUILayout.PropertyField(perlinTimeMulti);
        }
        //EditorGUILayout.PropertyField(distance);
        //EditorGUILayout.PropertyField(distanceOverTime);
        distance         = EditorGUILayout.CurveField("Distance", distance);
        distanceOverTime = EditorGUILayout.CurveField("Distance Over Time", distanceOverTime);

        EditorGUILayout.PropertyField(distanceOverTimeMulti);
        EditorGUILayout.Space();         //////////////////SPACE
        if (this != null)
        {
            serializedData.ApplyModifiedProperties();                     //since break; cant be called
        }
    }
Exemplo n.º 3
0
    public void DrawCustomInspector(SuperTextMesh stm)
    {
        var serializedData = new SerializedObject(this);

        serializedData.Update();
        //gather parts for this data:
        SerializedProperty gradient       = serializedData.FindProperty("gradient");
        SerializedProperty gradientSpread = serializedData.FindProperty("gradientSpread");
        SerializedProperty scrollSpeed    = serializedData.FindProperty("scrollSpeed");
        SerializedProperty direction      = serializedData.FindProperty("direction");
        SerializedProperty smoothGradient = serializedData.FindProperty("smoothGradient");

        //Title bar:
        STMCustomInspectorTools.DrawTitleBar(this, stm);
        //the rest:
        EditorGUILayout.PropertyField(gradient);
        EditorGUILayout.PropertyField(gradientSpread);
        EditorGUILayout.PropertyField(scrollSpeed);
        EditorGUILayout.PropertyField(direction);
        EditorGUILayout.PropertyField(smoothGradient);
        EditorGUILayout.Space();         //////////////////SPACE
        if (this != null)
        {
            serializedData.ApplyModifiedProperties();                     //since break; cant be called
        }
    }
Exemplo n.º 4
0
    //public float speed = 0.5f; //scroll speed
    //public float spread = 0.1f; //how far it stretches, in local

        #if UNITY_EDITOR
    public void DrawCustomInspector(SuperTextMesh stm)
    {
        var serializedData = new SerializedObject(this);

        serializedData.Update();
        //gather parts for this data:
        SerializedProperty texture          = serializedData.FindProperty("texture");
        SerializedProperty filterMode       = serializedData.FindProperty("filterMode");
        SerializedProperty relativeToLetter = serializedData.FindProperty("relativeToLetter");
        SerializedProperty scaleWithText    = serializedData.FindProperty("scaleWithText");
        SerializedProperty tiling           = serializedData.FindProperty("tiling");
        SerializedProperty offset           = serializedData.FindProperty("offset");
        SerializedProperty scrollSpeed      = serializedData.FindProperty("scrollSpeed");

        //Title bar:
        STMCustomInspectorTools.DrawTitleBar(this, stm);
        //the rest:
        EditorGUILayout.PropertyField(texture);
        EditorGUILayout.PropertyField(filterMode);
        EditorGUILayout.PropertyField(relativeToLetter);
        EditorGUILayout.PropertyField(scaleWithText);
        EditorGUILayout.PropertyField(tiling);
        EditorGUILayout.PropertyField(offset);
        EditorGUILayout.PropertyField(scrollSpeed);
        EditorGUILayout.Space();         //////////////////SPACE
        if (this != null)
        {
            serializedData.ApplyModifiedProperties();                     //since break; cant be called
        }
    }
Exemplo n.º 5
0
    public void DrawCustomInspector(SuperTextMesh stm)
    {
        var serializedData = new SerializedObject(this);

        serializedData.Update();
        //gather parts for this data:
        SerializedProperty animateFromTimeDrawn = serializedData.FindProperty("animateFromTimeDrawn");
        SerializedProperty main = serializedData.FindProperty("main");
        SerializedProperty individualVertexControl = serializedData.FindProperty("individualVertexControl");
        SerializedProperty topLeft     = serializedData.FindProperty("topLeft");
        SerializedProperty topRight    = serializedData.FindProperty("topRight");
        SerializedProperty bottomLeft  = serializedData.FindProperty("bottomLeft");
        SerializedProperty bottomRight = serializedData.FindProperty("bottomRight");

        //Title bar:
        STMCustomInspectorTools.DrawTitleBar(this, stm);
        //the rest:
        EditorGUILayout.PropertyField(animateFromTimeDrawn);
        EditorGUILayout.PropertyField(main, true);
        EditorGUILayout.PropertyField(individualVertexControl);
        if (individualVertexControl.boolValue)
        {
            EditorGUILayout.PropertyField(topLeft, true);
            EditorGUILayout.PropertyField(topRight, true);
            EditorGUILayout.PropertyField(bottomLeft, true);
            EditorGUILayout.PropertyField(bottomRight, true);
        }
        EditorGUILayout.Space();         //////////////////SPACE
        if (this != null)
        {
            serializedData.ApplyModifiedProperties();                     //since break; cant be called
        }
    }
Exemplo n.º 6
0
    public void DrawCustomInspector(SuperTextMesh stm)
    {
        Undo.RecordObject(this, "Edited STM Wave Data");
        var serializedData = new SerializedObject(this);

        serializedData.Update();
        //gather parts for this data:
        SerializedProperty animateFromTimeDrawn = serializedData.FindProperty("animateFromTimeDrawn");
        //SerializedProperty position = serializedData.FindProperty("position");
        //SerializedProperty rotation = serializedData.FindProperty("rotation");
        //SerializedProperty scale = serializedData.FindProperty("scale");
        SerializedProperty individualVertexControl = serializedData.FindProperty("individualVertexControl");
        SerializedProperty positionControl         = serializedData.FindProperty("positionControl");
        SerializedProperty rotationControl         = serializedData.FindProperty("rotationControl");
        SerializedProperty scaleControl            = serializedData.FindProperty("scaleControl");

        //SerializedProperty topLeft = serializedData.FindProperty("topLeft");
        //SerializedProperty topRight = serializedData.FindProperty("topRight");
        //SerializedProperty bottomLeft = serializedData.FindProperty("bottomLeft");
        //SerializedProperty bottomRight = serializedData.FindProperty("bottomRight");
        //Title bar:
        STMCustomInspectorTools.DrawTitleBar(this, stm);
        //the rest:
        EditorGUILayout.PropertyField(animateFromTimeDrawn);
        EditorGUILayout.PropertyField(positionControl);
        if (positionControl.boolValue)
        {
            position.DrawInspector("Position");
        }
        EditorGUILayout.PropertyField(rotationControl);
        if (rotationControl.boolValue)
        {
            rotation.DrawInspector("Rotation");
        }
        EditorGUILayout.PropertyField(scaleControl);
        if (scaleControl.boolValue)
        {
            scale.DrawInspector("Scale");
        }
        EditorGUILayout.PropertyField(individualVertexControl);
        if (individualVertexControl.boolValue)
        {
            //EditorGUILayout.PropertyField(topLeft,true);
            //EditorGUILayout.PropertyField(topRight,true);
            //EditorGUILayout.PropertyField(bottomLeft,true);
            //EditorGUILayout.PropertyField(bottomRight,true);
            topLeft.DrawInspector("Top Left");
            topRight.DrawInspector("Top Right");
            bottomLeft.DrawInspector("Bottom Left");
            bottomRight.DrawInspector("Bottom Right");
        }
        EditorGUILayout.Space();         //////////////////SPACE
        if (this != null)
        {
            serializedData.ApplyModifiedProperties();                     //since break; cant be called
        }
    }
Exemplo n.º 7
0
    public void DrawCustomInspector(SuperTextMesh stm)
    {
        var serializedData = new SerializedObject(this);

        serializedData.Update();
        //gather parts for this data:
        SerializedProperty texture    = serializedData.FindProperty("texture");
        SerializedProperty filterMode = serializedData.FindProperty("filterMode");
        SerializedProperty columns    = serializedData.FindProperty("columns");
        SerializedProperty rows       = serializedData.FindProperty("rows");
        SerializedProperty iconIndex  = serializedData.FindProperty("iconIndex");
        SerializedProperty size       = serializedData.FindProperty("size");
        SerializedProperty offset     = serializedData.FindProperty("offset");
        SerializedProperty advance    = serializedData.FindProperty("advance");
        SerializedProperty animDelay  = serializedData.FindProperty("animDelay");
        SerializedProperty frames     = serializedData.FindProperty("frames");
        SerializedProperty silhouette = serializedData.FindProperty("silhouette");

        //Title bar:
        STMCustomInspectorTools.DrawTitleBar(this, stm);
        //the rest:
        EditorGUILayout.PropertyField(texture);
        if (this.texture != null)
        {
            EditorGUILayout.PropertyField(silhouette);
            EditorGUILayout.PropertyField(filterMode);
            EditorGUILayout.Space();             //////////////////SPACE
            EditorGUILayout.PropertyField(columns);
            EditorGUILayout.PropertyField(rows);
            EditorGUILayout.Space();             //////////////////SPACE
            if (this.animDelay <= 0f)
            {
                EditorGUILayout.PropertyField(iconIndex);                 //use single icon index
            }
            if (this.columns > 1)
            {
                EditorGUILayout.PropertyField(animDelay);
                if (this.animDelay > 0f)
                {
                    EditorGUILayout.PropertyField(frames, true);                     //iterate thru multiple
                }
            }
            EditorGUILayout.Space();             //////////////////SPACE
        }
        EditorGUILayout.PropertyField(size);
        EditorGUILayout.PropertyField(offset);
        EditorGUILayout.PropertyField(advance);
        EditorGUILayout.Space();         //////////////////SPACE
        //FixColumnCount();
        if (this != null)
        {
            serializedData.ApplyModifiedProperties();                     //since break; cant be called
        }
    }
Exemplo n.º 8
0
    public void DrawCustomInspector(SuperTextMesh stm)
    {
        var serializedData = new SerializedObject(this);

        serializedData.Update();
        //gather parts for this data:
        SerializedProperty clips = serializedData.FindProperty("clips");

        //Title bar:
        STMCustomInspectorTools.DrawTitleBar(this, stm);
        //the rest:
        EditorGUILayout.PropertyField(clips, true);
        if (this != null)
        {
            serializedData.ApplyModifiedProperties();                     //since break; cant be called
        }
    }
    public void DrawCustomInspector(SuperTextMesh stm)
    {
        Undo.RecordObject(this, "Edited STM Quad Data");
        var serializedData = new SerializedObject(this);

        serializedData.Update();
        //Title bar:
        STMCustomInspectorTools.DrawTitleBar(this, stm);
        //the rest:
        EditorGUILayout.PropertyField(serializedData.FindProperty("texture"));
        if (this.texture != null)
        {
            EditorGUILayout.PropertyField(serializedData.FindProperty("silhouette"));
            EditorGUILayout.PropertyField(serializedData.FindProperty("overrideFilterMode"));
            EditorGUI.BeginDisabledGroup(!this.overrideFilterMode);
            EditorGUILayout.PropertyField(serializedData.FindProperty("filterMode"));
            EditorGUI.EndDisabledGroup();
            EditorGUILayout.Space();             //////////////////SPACE
            EditorGUILayout.PropertyField(serializedData.FindProperty("columns"));
            EditorGUILayout.PropertyField(serializedData.FindProperty("rows"));
            EditorGUILayout.Space();             //////////////////SPACE
            if (this.animDelay <= 0f)
            {
                EditorGUILayout.PropertyField(serializedData.FindProperty("iconIndex"));                 //use single icon index
            }
            if (this.columns > 1)
            {
                EditorGUILayout.PropertyField(serializedData.FindProperty("animDelay"));
                if (this.animDelay > 0f)
                {
                    EditorGUILayout.PropertyField(serializedData.FindProperty("frames"), true);                     //iterate thru multiple
                }
            }
            EditorGUILayout.Space();             //////////////////SPACE
        }
        EditorGUILayout.PropertyField(serializedData.FindProperty("size"));
        EditorGUILayout.PropertyField(serializedData.FindProperty("offset"));
        EditorGUILayout.PropertyField(serializedData.FindProperty("advance"));
        EditorGUILayout.Space();         //////////////////SPACE
        //FixColumnCount();
        if (this != null)
        {
            serializedData.ApplyModifiedProperties();                     //since break; cant be called
        }
    }
    public void DrawCustomInspector(SuperTextMesh stm)
    {
        Undo.RecordObject(this, "Edited STM Color Data");
        var serializedData = new SerializedObject(this);

        serializedData.Update();
        //gather parts for this data:
        SerializedProperty color = serializedData.FindProperty("color");

        //Title bar:
        STMCustomInspectorTools.DrawTitleBar(this, stm);
        //the rest:
        EditorGUILayout.PropertyField(color);
        EditorGUILayout.Space();         //////////////////SPACE
        if (this != null)
        {
            serializedData.ApplyModifiedProperties();                     //since break; cant be called
        }
    }
    public Color32 startColor = Color.clear;                                                                          //for fill/fade.

    //add curves for this stuff!

        #if UNITY_EDITOR
    public void DrawCustomInspector(SuperTextMesh stm)
    {
        Undo.RecordObject(this, "Edited STM Draw Animation Data");
        var serializedData = new SerializedObject(this);

        serializedData.Update();
        //gather parts for this data:
        SerializedProperty animTime = serializedData.FindProperty("animTime");
        //SerializedProperty animCurve = serializedData.FindProperty("animCurve");
        SerializedProperty startScale  = serializedData.FindProperty("startScale");
        SerializedProperty startOffset = serializedData.FindProperty("startOffset");
        SerializedProperty fadeTime    = serializedData.FindProperty("fadeTime");
        //SerializedProperty fadeCurve = serializedData.FindProperty("fadeCurve");
        SerializedProperty startColor = serializedData.FindProperty("startColor");

        //Title bar:
        STMCustomInspectorTools.DrawTitleBar(this, stm);
        //the rest:
        EditorGUILayout.PropertyField(animTime);
        if (animTime.floatValue > 0f)
        {
            //EditorGUILayout.PropertyField(animCurve);
            animCurve = EditorGUILayout.CurveField("Anim Curve", animCurve);
            EditorGUILayout.PropertyField(startScale);
            EditorGUILayout.PropertyField(startOffset);
        }
        EditorGUILayout.PropertyField(fadeTime);
        if (fadeTime.floatValue > 0f)
        {
            //EditorGUILayout.PropertyField(fadeCurve);
            fadeCurve = EditorGUILayout.CurveField("Fade Curve", fadeCurve);
        }
        EditorGUILayout.PropertyField(startColor);

        EditorGUILayout.Space();         //////////////////SPACE
        if (this != null)
        {
            serializedData.ApplyModifiedProperties();                     //since break; cant be called
        }
    }
Exemplo n.º 12
0
    public void DrawCustomInspector(SuperTextMesh stm)
    {
        Undo.RecordObject(this, "Edited STM Font Data");
        var serializedData = new SerializedObject(this);

        serializedData.Update();
        //Title bar:
        STMCustomInspectorTools.DrawTitleBar(this, stm);
        //the rest:
        EditorGUILayout.PropertyField(serializedData.FindProperty("font"));
        if (this.font != null)
        {
            if (!this.font.dynamic)
            {
                EditorGUI.BeginDisabledGroup(!this.font.dynamic);
                EditorGUILayout.PropertyField(serializedData.FindProperty("overrideQuality"));                //for show
                this.quality = EditorGUILayout.IntSlider("Quality", this.font.fontSize, 1, 512);              //set to default
                EditorGUI.EndDisabledGroup();
            }
            else
            {
                EditorGUILayout.PropertyField(serializedData.FindProperty("overrideQuality"));
                EditorGUI.BeginDisabledGroup(!this.overrideQuality);
                EditorGUILayout.PropertyField(serializedData.FindProperty("quality"));
                EditorGUI.EndDisabledGroup();
            }
            EditorGUILayout.PropertyField(serializedData.FindProperty("overrideFilterMode"));
            EditorGUI.BeginDisabledGroup(!this.overrideFilterMode);
            EditorGUILayout.PropertyField(serializedData.FindProperty("filterMode"));
            EditorGUI.EndDisabledGroup();
        }
        EditorGUILayout.Space();         //////////////////SPACE
        if (this != null)
        {
            serializedData.ApplyModifiedProperties();                     //since break; cant be called
        }
    }