UIText

类位于 InfEngine.ui

继承自: InfUIScreenComponent

描述

UI 文本组件。在屏幕上显示文字。

description

属性

名称 类型 描述
text str 显示的文本内容。 (只读)
font_path str (只读)
font_size float 字体大小。 (只读)
line_height float (只读)
letter_spacing float (只读)
text_align_h TextAlignH (只读)
text_align_v TextAlignV (只读)
overflow TextOverflow (只读)
resize_mode TextResizeMode (只读)
color list 文本颜色。 (只读)

properties

公共方法

方法 描述
is_auto_width() → bool
is_auto_height() → bool
is_fixed_size() → bool
get_wrap_width() → float
get_layout_tolerance() → float
get_editor_wrap_width() → float
get_auto_size_padding() → tuple[float, float]
is_width_editable() → bool
is_height_editable() → bool

public_methods

示例

# TODO: Add example for UIText

example

另请参阅

see_also