// Token: 0x06004D68 RID: 19816 RVA: 0x00133DB0 File Offset: 0x00131FB0 public override void OnFill(NGUI.Meshing.MeshBuffer m) { if (this.mOuterUV == this.mInnerUV) { base.OnFill(m); return; } NGUI.Structures.float3 @float = default(NGUI.Structures.float3); @float.xyz = base.cachedTransform.localScale; Vector4 vector; vector.x = this.mOuterUV.xMin; vector.y = this.mInnerUV.xMin; vector.z = this.mInnerUV.xMax; vector.w = this.mOuterUV.xMax; Vector4 vector2; vector2.x = this.mOuterUV.yMin; vector2.y = this.mInnerUV.yMin; vector2.z = this.mInnerUV.yMax; vector2.w = this.mOuterUV.yMax; NGUI.Structures.NineRectangle nineRectangle; NGUI.Structures.NineRectangle nineRectangle2; NGUI.Structures.NineRectangle.Calculate(base.pivot, base.atlas.pixelSize, base.mainTexture, ref vector, ref vector2, ref @float.xy, out nineRectangle, out nineRectangle2); Color color = base.color; if (this.mFillCenter) { NGUI.Structures.NineRectangle.Fill9(ref nineRectangle, ref nineRectangle2, ref color, m); } else { NGUI.Structures.NineRectangle.Fill8(ref nineRectangle, ref nineRectangle2, ref color, m); } }
// Token: 0x06002B1E RID: 11038 RVA: 0x000A0038 File Offset: 0x0009E238 public override void OnFill(NGUI.Meshing.MeshBuffer m) { float num = this._degreesOfRotation * 0.0174532924f; float num2 = this._sliceDegrees * 0.0174532924f; float sliceFill = this._sliceFill; int num3 = this.slices + 1; float num4 = (num - num2 * (float)this.slices) * sliceFill; float num5 = num4 / (float)num3; float num6 = num4 / 6.28318548f; float num7 = (num - num4) / (float)num3; NGUI.Structures.float3 @float = default(NGUI.Structures.float3); @float.xyz = base.cachedTransform.localScale; float num8 = (@float.x >= @float.y) ? @float.x : @float.y; @float.xy.x = 3.14159274f * num8 / (float)num3 * num6; @float.xy.y = num8 * (this.outerRadius * 0.5f); Vector4 vector; vector.x = this.mOuterUV.xMin; vector.y = this.mInnerUV.xMin; vector.z = this.mInnerUV.xMax; vector.w = this.mOuterUV.xMax; Vector4 vector2; vector2.x = this.mOuterUV.yMin; vector2.y = this.mInnerUV.yMin; vector2.z = this.mInnerUV.yMax; vector2.w = this.mOuterUV.yMax; NGUI.Structures.NineRectangle nineRectangle; NGUI.Structures.NineRectangle nineRectangle2; NGUI.Structures.NineRectangle.Calculate(global::UIWidget.Pivot.Center, base.atlas.pixelSize, base.mainTexture, ref vector, ref vector2, ref @float.xy, out nineRectangle, out nineRectangle2); if (this.innerRadius > 0f && !Mathf.Approximately(nineRectangle.zz.x - nineRectangle.yy.x, 0f)) { @float.xy.x = 3.14159274f * num8 * this.innerRadius / (float)num3 * num6; NGUI.Structures.NineRectangle nineRectangle3; NGUI.Structures.NineRectangle nineRectangle4; NGUI.Structures.NineRectangle.Calculate(global::UIWidget.Pivot.Center, base.atlas.pixelSize, base.mainTexture, ref vector, ref vector2, ref @float.xy, out nineRectangle3, out nineRectangle4); float num9 = (nineRectangle.yy.x + nineRectangle.zz.x) * 0.5f; if (nineRectangle3.yy.x > num9) { float num10 = (nineRectangle3.yy.x - num9) / (nineRectangle.ww.x - num9); if (num10 >= 1f) { nineRectangle3.xx.x = nineRectangle.xx.x; nineRectangle3.xx.y = nineRectangle.xx.y; nineRectangle3.yy.x = nineRectangle.yy.x; nineRectangle3.yy.y = nineRectangle.yy.y; nineRectangle3.zz.x = nineRectangle.zz.x; nineRectangle3.zz.y = nineRectangle.zz.y; nineRectangle3.ww.x = nineRectangle.ww.x; nineRectangle3.ww.y = nineRectangle.ww.y; nineRectangle4.xx.x = nineRectangle2.xx.x; nineRectangle4.xx.y = nineRectangle2.xx.y; nineRectangle4.yy.x = nineRectangle2.yy.x; nineRectangle4.yy.y = nineRectangle2.yy.y; nineRectangle4.zz.x = nineRectangle2.zz.x; nineRectangle4.zz.y = nineRectangle2.zz.y; nineRectangle4.ww.x = nineRectangle2.ww.x; nineRectangle4.ww.y = nineRectangle2.ww.y; } else { float num11 = 1f - num10; nineRectangle3.xx.y = nineRectangle.xx.y * num10 + nineRectangle3.xx.y * num11; nineRectangle3.yy.x = nineRectangle.yy.x * num10 + 0.5f * num11; nineRectangle3.yy.y = nineRectangle.yy.y * num10 + nineRectangle3.yy.y * num11; nineRectangle3.zz.x = nineRectangle.zz.x * num10 + 0.5f * num11; nineRectangle3.zz.y = nineRectangle.zz.y * num10 + nineRectangle3.zz.y * num11; nineRectangle3.ww.y = nineRectangle.ww.y * num10 + nineRectangle3.ww.y * num11; nineRectangle3.ww.x = nineRectangle.ww.x; nineRectangle3.xx.x = nineRectangle.xx.x; } } } else { NGUI.Structures.NineRectangle nineRectangle3; nineRectangle3.xx.x = nineRectangle.xx.x; nineRectangle3.xx.y = nineRectangle.xx.y; nineRectangle3.yy.x = nineRectangle.yy.x; nineRectangle3.yy.y = nineRectangle.yy.y; nineRectangle3.zz.x = nineRectangle.zz.x; nineRectangle3.zz.y = nineRectangle.zz.y; nineRectangle3.ww.x = nineRectangle.ww.x; nineRectangle3.ww.y = nineRectangle.ww.y; NGUI.Structures.NineRectangle nineRectangle4; nineRectangle4.xx.x = nineRectangle2.xx.x; nineRectangle4.xx.y = nineRectangle2.xx.y; nineRectangle4.yy.x = nineRectangle2.yy.x; nineRectangle4.yy.y = nineRectangle2.yy.y; nineRectangle4.zz.x = nineRectangle2.zz.x; nineRectangle4.zz.y = nineRectangle2.zz.y; nineRectangle4.ww.x = nineRectangle2.ww.x; nineRectangle4.ww.y = nineRectangle2.ww.y; } float num12 = Mathf.Abs(nineRectangle.ww.x - nineRectangle.xx.x); float num13 = num5 / num12; if (num2 > 0f) { num12 += num2 / num13; num13 = num5 / num12; } float num14 = this.innerRadius * 0.5f; float num15 = this.outerRadius * 0.5f; float num16 = Mathf.Min(nineRectangle.xx.y, nineRectangle.ww.y); float num17 = Mathf.Max(nineRectangle.ww.y, nineRectangle.xx.y) - num16; Color color = base.color; int num18 = m.vSize; float num19 = num7 + num5; float num20 = num7 * -0.5f + (this._facialRotationOffset * 0.5f + 0.5f) * num5 + this._addDegrees * 0.0174532924f; for (;;) { NGUI.Meshing.Vertex[] v = m.v; int vSize = m.vSize; for (int i = num18; i < vSize; i++) { float num21 = num14 + (v[i].y - num16) / num17 * num15; float num22 = v[i].x * num13 + num20; v[i].x = 0.5f + Mathf.Sin(num22) * num21; v[i].y = -0.5f + Mathf.Cos(num22) * num21; } if (--num3 <= 0) { break; } num20 += num19; num18 = vSize; } }