zoukankan      html  css  js  c++  java
  • NGUI之UILabel

    重要属性说明

    overflow:

         Shrink Content: 意味着内容会自动被缩小以便适应区域。它在你使用动态字体的同时使用Keep      Crisp设置时有效,让字体变小,而不是缩放内容。

         Clamp Content:简单意味着如果文本没有适应,就直接截断。

         Resize Freely:选项让label的大小通过文本来控制。你不能自己修改大小。

         Resize Height:将在必要的时候增加label的高度,但会保持宽度是常量。

    spacing:  可以让你调整字符间的距离。正负数都可以,单位是像素。

    Max Line:  可以让你控制你最大想要多少行。0的话是不限制。

    BBCode语法(需勾选BBCode)

    You can use BBCode to make words [b]bold[/b], [i]italic[/i], [u]underline[/u], [s]strikethrough[/s],

    [sub]sub[/sub] or [sup]sup[/sup] script, and even embed hidden content and [url=http://www.tasharen.com/][u]clickable hyperlinks[/u][/url]. Go ahead, click it!

    Search the [99ff00]Project View[-] for "Control", then drag & drop the prefab you want directly into the [99ff00]Scene View[-]. :)

    Emoticons? Sure, why not:
    :) :D <_< >_< x_x -_- o.o
    (A) (B) (X) (Y)

    将UILabel Attach BoxCollider, IsTrigger=true

    OpenURLOnClick.cs如下

    public class OpenURLOnClick : MonoBehaviour
    {
        void OnClick ()
        {
            UILabel lbl = GetComponent<UILabel>();
            
            if (lbl != null)
            {
                string url = lbl.GetUrlAtPosition(UICamera.lastWorldPosition);
                if (!string.IsNullOrEmpty(url)) Application.OpenURL(url);
            }
        }
    }
  • 相关阅读:
    Java检测文件是否UTF8编码
    Linux: uid/euid/suid的关系
    位移运算
    Springmvc 重定向参数传递方式
    @RequestBody和@RequestParam区别
    jsp页面老提示Multiple annotations found at this line:
    滚动表格代码
    滚动条样式修改
    WebService的四种客户端调用方式
    table元素的td和ul元素li隔行变色
  • 原文地址:https://www.cnblogs.com/greyhh/p/4729002.html
Copyright © 2011-2022 走看看