public override void OnFill(BetterList <Vector3> verts, BetterList <Vector2> uvs, BetterList <Color32> cols)
#endif
{
if (mFont == null)
{
return;
}
MakePositionPerfect();
Pivot p = pivot;
int offset = verts.size;
// Print the text into the buffers
if (p == Pivot.Left || p == Pivot.TopLeft || p == Pivot.BottomLeft)
{
mFont.Print(processedText, color, verts, uvs, cols, mEncoding, mSymbols, UIFont.Alignment.Left, 0);
}
else if (p == Pivot.Right || p == Pivot.TopRight || p == Pivot.BottomRight)
{
mFont.Print(processedText, color, verts, uvs, cols, mEncoding, mSymbols, UIFont.Alignment.Right,
Mathf.RoundToInt(relativeSize.x * mFont.size));
}
else
{
mFont.Print(processedText, color, verts, uvs, cols, mEncoding, mSymbols, UIFont.Alignment.Center,
Mathf.RoundToInt(relativeSize.x * mFont.size));
}
// Apply an effect if one was requested
if (effectStyle != Effect.None)
{
Vector3 scale = cachedTransform.localScale;
if (scale.x == 0f || scale.y == 0f)
{
return;
}
int end = verts.size;
float pixel = 1f / mFont.size;
ApplyShadow(verts, uvs, cols, offset, end, pixel, -pixel);
if (effectStyle == Effect.Outline)
{
offset = end;
end = verts.size;
ApplyShadow(verts, uvs, cols, offset, end, -pixel, pixel);
offset = end;
end = verts.size;
ApplyShadow(verts, uvs, cols, offset, end, pixel, pixel);
offset = end;
end = verts.size;
ApplyShadow(verts, uvs, cols, offset, end, -pixel, -pixel);
}
}
}