UILabel设置行间距

作者:追风剑情 发布于:2014-8-22 17:44 分类:NGUI

  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class TestUILabel : MonoBehaviour {
  5.  
  6. public UILabel label;
  7. public int hspacing = 2;
  8. public int vspacing = 2;
  9.  
  10. // Use this for initialization
  11. void Start () {
  12. label.font.horizontalSpacing = hspacing;//设置字间距
  13. label.font.verticalSpacing = vspacing;//设置行间距
  14. }
  15. }

运行效果

UILabel.png

标签: NGUI

Powered by emlog  蜀ICP备18021003号-1   sitemap

川公网安备 51019002001593号