zoukankan      html  css  js  c++  java
  • unity3d插件Daikon Forge GUI 中文教程6-高级控件richtextlabel的使用

    3.5、richtextlabel文本

    可以像Word文档一样编辑出多样的内容,图片,字体颜色大小下划线、超链接背景等等。

    Defaults:

    默认字体

    默认图集

    Blank Texture :空白的纹理

    Appearance

    Font Size 默认字体大小

    Line Height 行的高度,最小也不会小于默认字体大小(系统处理)。

    TextStyle 默认文本的风格,加粗下划线斜体等。

    keep whitespace 是否使用Text中文本的换行(Html的换行是:<br/>,如果选中,那么正常文本中的普通换行也算是换行)

    Text Color 默认的文本颜色。

    Alignment 文本的对其方式。

    Layout :

    Auto Height 是指自动调整上面Layout-》 Size-》 Height的大小。如果设置了那么下面的滚动条Scrolling选项就不能再用了。要根据实际的情况进行取舍。

    Scrolling

    Allow Scroll是否允许滚动。

    Scroll Pos x,y  设置水平,垂直滚动条的起始滚动值。

    Add Momentum 作用还是未知,

    水平滚动条对象。

    垂直滚动条对象。

    DF-gui呢使用了编写网页的标记性语言。 大家可以了解一下例子看看,下面是例子的一部分代码。

    编辑上面的图片中的内容需要填写的文本的内容。如下:

    Text:

    <h1 color=yellowstyle="vertical-align: top; margin: 0;"><imgsrc="dfgui-icon" height=100 color=white> Using Rich TextMarkup</h1>

    <h2color=cyan>Introduction</h2>

    <p padding="5 10" style="text-align:justify; margin: 25px">

    The DF-GUI Rich Text Control uses Unity'sdynamic fonts system to render TTF or OTF fonts

    without requiring the use of a textureatlas. The dynamic font system builds a dynamic

    texture atlas internally "ondemand", allowing you to use multiple font styles (like<b>bold</b> and

    <i>italic</i>) as well as<font size="125%">different sizes</font> all in the sameline of text.

    </p>

    <p style="text-align: justify;margin: 25px">This also allows you to mix and match character sets inthe same label, like the following:

             <ul>

                       <li>Japanese:<span style="color: orange">日本語</span></li>

                       <li>Chinese:<span style="color: orange">汉语/漢語</span></li>

                       <li>Korean:<span style="color: orange">한국어/조선말</span></li>

                       <li>Hebrew:<span style="color: orange">עִבְרִית</span></li>

                       <li>Greek:<span style="color: orange">κρίνω</span></li>

                       <li>etc...</li>

             </ul>

    </p>

    <p style="text-align: justify;margin: 25px">

    All text in this panel was rendered with asingle <b>dfRichTextLabel</b> control.

    All font styles, colors, sizes, and effectswere specified through the use of an

    HTML-like markup that has been specificallydesigned to be familiar to people

    who have experience with HTML. Much like<a href="http://docs.unity3d.com/Documentation/Manual/StyledText.html"style="color: Green; font-style: bold">Unity&#39;s built-in&quot;rich text&quot; markup</a>,

    the<strong>dfRichTextLabel</strong> control uses a subset of thespecified HTML tags to control

    text formatting, but unlike Unity&#39;ssolution the tags that <strong>dfRichTextLabel

    ………………………………………….

    <br/>

  • 相关阅读:
    如何学习掌握一门新技术
    Linux多线程编程(不限Linux)
    腾讯后台开发面试题2
    腾讯后台开发面试题
    【转】Linux杀死fork产生的子进程的僵尸进程defunct
    【转】Linux网络编程入门
    【转】揭开Socket编程的面纱
    【转】简单理解socket
    【转】404、500、502等HTTP状态码介绍
    【转】fread函数和fwrite函数
  • 原文地址:https://www.cnblogs.com/jiangshuai52511/p/5386498.html
Copyright © 2011-2022 走看看