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);
            }
        }
    }
  • 相关阅读:
    使用代理加快SDK Manager的下载速度
    ADT-Bundle运行的错误的排错
    转:Android开发之JNI入门-NDK从入门到精通
    Android NDK的总总误解
    mysql 数据库 一些常用语句 查内存 索引内存
    递归方法 练习编写
    ES 搜索概述
    PHP 数字类型 加 减 乘 除运算 bc函数
    php 控制反转 和 依赖注入
    Thinkphp 3 和 Thinkphp5 区别
  • 原文地址:https://www.cnblogs.com/greyhh/p/4729002.html
Copyright © 2011-2022 走看看