Esempio n. 1
0
    public static Texture2D IcoEye(bool active)
    {
        var idx = GetIndex(active);
        var id  = "eye" + idx;

        return(TextureX.HasTextureId(id)
            ? id.xGetTextureFromId()
            : GetTexture(idx, id, EYE_DARK_ACTIVE, EYE_DARK_INACTIVE, EYE_LIGHT_ACTIVE, EYE_LIGHT_INACTIVE));
    }
Esempio n. 2
0
    public static Texture2D IcoLock(bool active)
    {
        var idx = GetIndex(active);
        var id  = "lock" + idx;

        return(TextureX.HasTextureId(id)
            ? id.xGetTextureFromId()
            : GetTexture(idx, id, LOCK_DARK_ACTIVE, LOCK_DARK_INACTIVE, LOCK_LIGHT_ACTIVE, LOCK_LIGHT_INACTIVE));
    }
Esempio n. 3
0
    public static Texture2D IcoStatic(bool active)
    {
        var idx = GetIndex(active);
        var id  = "static" + idx;

        return(TextureX.HasTextureId(id)
            ? id.xGetTextureFromId()
            : GetTexture(idx, id, STATIC_DARK_ACTIVE, STATIC_DARK_INACTIVE, STATIC_LIGHT_ACTIVE, STATIC_LIGHT_INACTIVE));
    }
Esempio n. 4
0
        private void Highlight(Rect r)
        {
            if (hlTexture == null)
            {
                hlTexture = TextureX.xGetTexture2D(h2Color.Get(h2ColorType.ParentHL));
            }

            var rr = r;

            //rr.y += 8f;
            //rr.height = 1;
            rr.yMin += 15f;

            GUI.DrawTexture(rr, hlTexture);
        }
Esempio n. 5
0
    void Start()
    {
        TextureX
        // initialize a new texturex instance with the specified texture. all the following commands will apply to this texture.
        .Use(tex)
        // run a convolution kernel on the texture.
        .Kernel(Kernels.EdgeDetection(3, 3))
        // apply the state of the texture.
        .Apply()
        // save the texture to disk.
        .Save("texturex.png", out bool saved)
        // and you can also keep working on the texture, cool! :D
        .Random()

        .Apply()

        .Save("random.png", out saved)
        ;
    }