zoukankan      html  css  js  c++  java
  • Unity2017.1官方UGUI文档翻译——Text

    Text

     文本

    The Text control displays a non-interactive piece of text to the user. This can be used to provide captions or labels for other GUI controls or to display instructions or other text.

    文本控件向用户显示一个非交互式的文本片段。 它可以作为其他GUI控件提供标题或标签,或作为说明文本,或者其他用途。

    Properties

    属性

    Property:Function:
    Text The text displayed by the control.
    Character
    Font The Font used to display the text.
    Font Style The style applied to the text. The options are NormalBoldItalic and Bold And Italic.
    Font Size The size of the displayed text.
    Line Spacing The vertical separation between lines of text.
    Rich Text Should markup elements in the text be interpreted as Rich Text styling?
    Paragraph
    Alignment The horizontal and vertical alignment of the text.
    Align by Geometry Use the extents of glyph geometry to perform horizontal alignment rather than glyph metrics.
    Horizontal Overflow The method used to handle the situation where the text is too wide to fit in the rectangle. The options are Wrap and Overflow.
    Vertical Overflow The method used to handle the situation where wrapped text is too tall to fit in the rectangle. The options are Truncate and Overflow.
    Best Fit Should Unity ignore the size properties and simply try to fit the text to the control’s rectangle?
       
    Color The color used to render the text.
    Material The Material used to render the text.
    属性功能
    Text 由控件显示的文本
    Character
    Font 用于显示文本的字体
    Font Style 应用于文本的样式。 选项是正常,粗体,斜体或粗体加斜体
    Font Size 文字的大小
    Line Spacing 行间距
    Rich Text 文本中的标记元素是否应该被解释为Rich Text样式
    Paragraph
    Alignment 文本的水平和垂直对齐
    Align by Geometry

    使用字形几何的范围来执行水平对齐而不是字形度量

    Horizontal Overflow 该方法用于处理文本太宽以至于无法放入矩形区域的情况。 选项是Wrap和Overflow
    Vertical Overflow

    该方法用于处理文本太高以至于无法放入矩形区域的情况。选项是Truncate和Overflow

    Best Fit Unity是否要忽略尺寸属性,只是简单地将文本放到控件的矩形区域中
       
    Color 文本的颜色
    Material 文本的Material

    A default text element looks like this:

    默认的文本元素如下所示:

    A Text element.

    A Text element.

    Details

    详细

    Some controls (such as Buttons and Toggles) have textual descriptions built-in. For controls that have no implicit text (such as Sliders), you can indicate the purpose using a label created with a Text control. Text is also useful for lists of instructions, story text, conversations and legal disclaimers.

    有一些空间(比如Buttons 和 Toggles)有内置的文本。对于没有隐式文本的控件(比如Sliders),你可以创建一个Text控件来达到目的。Text还可以用来显示说明列表、故事、对话和免责声明

    The Text control offers the usual parameters for font size, style, etc, and text alignment. When the Rich Text option is enabled, markup elements within the text will be treated as styling information, so you can have just a single word or short section in boldface or in a different color, say (see the page about Rich Text for details of the markup scheme).

    Text提供字体大小、样式、文本对齐等常用参数。当Rich Text被选中,text中的标签元素会被当做样式信息,所以你可以只让一个字或者一小段话加粗或者改变颜色(在关于Rich Text的页面中获得关于标签的更多信息)

    Hints

    提示

    • See the Effects page for how to apply a simple shadow or outline effect to the text.
    • 有关如何将简单阴影或轮廓效果应用于文本的信息,请参阅Effects页面
  • 相关阅读:
    Android开发 设置控件边角半圆
    Android开发 使用XML文件设置背景变化
    Android开发 ImageButton加载drawable文件问题
    Android开发 网络检测(使用广播监听)
    android studio无法在可视化页面预览布局文件
    jdbc连接oracle数据库
    「数学」- 暑假后文化课能力复健 20210906 ~ 20210912
    「数学」- 暑假后文化课能力复健 20210830 ~ 20210905
    「数学」高等代数学习笔记
    「数学」浅谈极值点偏移问题的处理技巧
  • 原文地址:https://www.cnblogs.com/SolarWings/p/8022171.html
Copyright © 2011-2022 走看看