Пример #1
0
 public override void OnFill(NGUI.Meshing.MeshBuffer m)
 {
     if (base.mOuterUV == this.mInnerUV)
     {
         base.OnFill(m);
     }
     else
     {
         NineRectangle rectangle;
         NineRectangle rectangle2;
         Vector4       vector;
         Vector4       vector2;
         float3        num = new float3 {
             xyz = base.cachedTransform.localScale
         };
         vector.x  = this.mOuterUV.xMin;
         vector.y  = this.mInnerUV.xMin;
         vector.z  = this.mInnerUV.xMax;
         vector.w  = this.mOuterUV.xMax;
         vector2.x = this.mOuterUV.yMin;
         vector2.y = this.mInnerUV.yMin;
         vector2.z = this.mInnerUV.yMax;
         vector2.w = this.mOuterUV.yMax;
         NineRectangle.Calculate(base.pivot, base.atlas.pixelSize, base.mainTexture, ref vector, ref vector2, ref num.xy, out rectangle, out rectangle2);
         Color color = base.color;
         if (this.mFillCenter)
         {
             NineRectangle.Fill9(ref rectangle, ref rectangle2, ref color, m);
         }
         else
         {
             NineRectangle.Fill8(ref rectangle, ref rectangle2, ref color, m);
         }
     }
 }
Пример #2
0
    public override void OnFill(MeshBuffer m)
    {
        NineRectangle nineRectangle;
        NineRectangle nineRectangle1;
        Vector4       vector4  = new Vector4();
        Vector4       vector41 = new Vector4();

        if (this.mOuterUV == this.mInnerUV)
        {
            base.OnFill(m);
            return;
        }
        float3 _float3 = new float3()
        {
            xyz = base.cachedTransform.localScale
        };

        vector4.x  = this.mOuterUV.xMin;
        vector4.y  = this.mInnerUV.xMin;
        vector4.z  = this.mInnerUV.xMax;
        vector4.w  = this.mOuterUV.xMax;
        vector41.x = this.mOuterUV.yMin;
        vector41.y = this.mInnerUV.yMin;
        vector41.z = this.mInnerUV.yMax;
        vector41.w = this.mOuterUV.yMax;
        NineRectangle.Calculate(base.pivot, base.atlas.pixelSize, base.mainTexture, ref vector4, ref vector41, ref _float3.xy, out nineRectangle, out nineRectangle1);
        Color color = base.color;

        if (!this.mFillCenter)
        {
            NineRectangle.Fill8(ref nineRectangle, ref nineRectangle1, ref color, m);
        }
        else
        {
            NineRectangle.Fill9(ref nineRectangle, ref nineRectangle1, ref color, m);
        }
    }