UIListItem.TruncateLeft C# (CSharp) Method

TruncateLeft() public method

public TruncateLeft ( float pct ) : void
pct float
return void
	public override void TruncateLeft(float pct)
	{
		base.TruncateLeft(pct);

		// Resize our collider:
		if (collider != null)
		{
			if (collider is BoxCollider)
			{
				if (customCollider)
				{
					BoxCollider c = (BoxCollider)collider;
					Vector3 tmp;

					tmp = c.center;
					tmp.x = (1f - pct) * (colliderBR.x - colliderTL.x) * 0.5f;
					c.center = tmp;

					tmp = c.size;
					tmp.x = pct * (colliderBR.x - colliderTL.x);
					c.size = tmp;
				}
				else
					UpdateCollider();
			}
		}
	}