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设计模式之代理模式 ,以及和java 回调机制的区别
    oracle 安装,启动 ,plsql 连接
    jsp 访问文件夹中的图片,tomcat配置虚拟目录
    最实用解决tomcat startup.bat 一闪而过
    oracle 创建表
    java debug源码完整版
    node.js事件轮询(1)
    markdown命令语法
    mac常用的命令
    node + nginx + mongo搭建负载均衡
  • 原文地址:https://www.cnblogs.com/greyhh/p/4729002.html
Copyright © 2011-2022 走看看