Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UIRichText

Hierarchy

Index

Constructors

constructor

Properties

Readonly entity

entity: Entity2D

Readonly id

id: number = ...

Readonly isDestroyed

isDestroyed: boolean = false

Readonly isDestroying

isDestroying: boolean = false

Readonly priority

priority: number = ...

queryDirty

queryDirty: boolean = false

Static BlendMode

BlendMode: Readonly<typeof BlendMode> = ...

二维渲染叠加混合方式

static
memberof

Renderable2D

Static BlendType

BlendType: Readonly<typeof BlendType> = ...

继承混合颜色的方式

static
memberof

Renderable2D

Static DefaultFontFamily

DefaultFontFamily: string = "Arial"

Static DefaultFontSize

DefaultFontSize: number = 12

Static OverflowType

OverflowType: typeof OverflowType = ...

Static Priority

Priority: { Align: number; Layout: number; Low: number; Physics: number; Render: number; Tool: number } = ...

Type declaration

  • Align: number
  • Layout: number
  • Low: number
  • Physics: number
  • Render: number
  • Tool: number

Static Optional Serialize

Serialize: (...args: any[]) => any

Type declaration

    • (...args: any[]): any
    • Parameters

      • Rest ...args: any[]

      Returns any

Static Style

Style: typeof Style = ...

富文本样式类

static
memberof

UIRichText

Static overflowType

overflowType: typeof OverflowType = ...

富文本越界处理方式枚举类型

static
memberof

UIRichText

Accessors

active

  • get active(): boolean
  • set active(value: boolean): void
  • Returns boolean

  • Parameters

    • value: boolean

    Returns void

activeInHierarchy

  • get activeInHierarchy(): boolean
  • 在场景树中是否active

    readonly
    memberof

    Component

    Returns boolean

align

  • Returns TextAlign

  • Parameters

    Returns void

alpha

  • get alpha(): number
  • set alpha(val: number): void
  • Returns number

  • Parameters

    • val: number

    Returns void

applyGradient

  • get applyGradient(): boolean
  • set applyGradient(val: boolean): void
  • Returns boolean

  • Parameters

    • val: boolean

    Returns void

autoSize

  • get autoSize(): boolean
  • set autoSize(val: boolean): void
  • Returns boolean

  • Parameters

    • val: boolean

    Returns void

bestFit

  • get bestFit(): boolean
  • set bestFit(val: boolean): void
  • Returns boolean

  • Parameters

    • val: boolean

    Returns void

bitmapFont

  • Returns BitmapFont

  • Parameters

    Returns void

bitmapFontUseFontColor

  • get bitmapFontUseFontColor(): boolean
  • set bitmapFontUseFontColor(val: boolean): void
  • Returns boolean

  • Parameters

    • val: boolean

    Returns void

bitmapFontUseFontSize

  • get bitmapFontUseFontSize(): boolean
  • set bitmapFontUseFontSize(val: boolean): void
  • Returns boolean

  • Parameters

    • val: boolean

    Returns void

blendMode

  • get blendMode(): BlendMode
  • set blendMode(val: BlendMode): void
  • 当前渲染元素的混合方式

    Returns BlendMode

  • 当前渲染元素的混合方式

    overload
    memberof

    Renderable2D

    Parameters

    • val: BlendMode

    Returns void

bold

  • get bold(): boolean
  • set bold(val: boolean): void
  • Returns boolean

  • Parameters

    • val: boolean

    Returns void

color

  • 渲染组件本身的颜色,用于与渲染元素进行颜色混合

    Returns Color

  • 渲染组件本身的颜色,用于与渲染元素进行颜色混合

    memberof

    Renderable2D

    Parameters

    Returns void

colorBlendType

  • 渲染组件继承父渲染组件颜色,颜色混合的方式

    Returns BlendType

  • 渲染组件继承父渲染组件颜色,颜色混合的方式

    overload
    memberof

    Renderable2D

    Parameters

    Returns void

cullingMask

  • get cullingMask(): number
  • set cullingMask(val: number): void
  • Returns number

  • deprecated

    Parameters

    • val: number

    Returns void

font

  • get font(): Font
  • set font(font: Font): void
  • Returns Font

  • Parameters

    Returns void

fontColor

  • get fontColor(): string | Color
  • set fontColor(val: string | Color): void
  • Returns string | Color

  • Parameters

    Returns void

fontFamily

  • get fontFamily(): string
  • set fontFamily(val: string): void
  • Returns string

  • Parameters

    • val: string

    Returns void

fontSize

  • get fontSize(): number
  • set fontSize(val: number): void
  • Returns number

  • Parameters

    • val: number

    Returns void

gradientBottom

  • get gradientBottom(): Color
  • set gradientBottom(val: Color): void
  • Returns Color

  • Parameters

    Returns void

gradientTop

  • get gradientTop(): Color
  • set gradientTop(val: Color): void
  • Returns Color

  • Parameters

    Returns void

isMask

  • get isMask(): boolean
  • Returns boolean

italic

  • get italic(): boolean
  • set italic(val: boolean): void
  • Returns boolean

  • Parameters

    • val: boolean

    Returns void

lineSpace

  • get lineSpace(): number
  • set lineSpace(val: number): void
  • Returns number

  • Parameters

    • val: number

    Returns void

material

  • 当前渲染元素的混合方式

    Returns Material

  • 当前渲染元素的混合方式

    overload
    memberof

    Renderable2D

    Parameters

    Returns void

metrics

  • get metrics(): DeepImmutableObject<{ height: number; innerHeight: number; innerWidth: number; layouHeight?: number; layoutWidth?: number; outerHeight: number; outerWidth: number; rowsNumber: number; width: number }>
  • Returns DeepImmutableObject<{ height: number; innerHeight: number; innerWidth: number; layouHeight?: number; layoutWidth?: number; outerHeight: number; outerWidth: number; rowsNumber: number; width: number }>

overflow

  • get overflow(): OverflowType
  • set overflow(val: OverflowType): void
  • 文本越界处理方式

    Returns OverflowType

  • 文本越界处理方式

    memberof

    UILabel

    Parameters

    • val: OverflowType

    Returns void

paddingBottom

  • get paddingBottom(): number
  • set paddingBottom(val: number): void
  • Returns number

  • Parameters

    • val: number

    Returns void

paddingLeft

  • get paddingLeft(): number
  • set paddingLeft(val: number): void
  • Returns number

  • Parameters

    • val: number

    Returns void

paddingRight

  • get paddingRight(): number
  • set paddingRight(val: number): void
  • Returns number

  • Parameters

    • val: number

    Returns void

paddingTop

  • get paddingTop(): number
  • set paddingTop(val: number): void
  • Returns number

  • Parameters

    • val: number

    Returns void

rowsNumber

  • get rowsNumber(): number
  • 获取行数

    readonly
    memberof

    UIRichText

    Returns number

shadowColor

  • get shadowColor(): Color
  • set shadowColor(val: Color): void
  • Returns Color

  • Parameters

    Returns void

shadowOffset

  • Returns Vector2

  • Parameters

    Returns void

spacing

  • get spacing(): number
  • set spacing(val: number): void
  • Returns number

  • Parameters

    • val: number

    Returns void

stroke

  • get stroke(): number
  • set stroke(val: number): void
  • Returns number

  • Parameters

    • val: number

    Returns void

strokeColor

  • get strokeColor(): Color
  • set strokeColor(val: Color): void
  • Returns Color

  • Parameters

    Returns void

style

  • get style(): IStyleMap
  • set style(style: IStyleMap): void
  • 获取富文本当前组件样式表(不包含全局)

    static
    memberof

    UIRichText

    Returns IStyleMap

  • 设置富文本当前组件样式表(移除原有所有样式)

    static
    memberof

    UIRichText

    Parameters

    • style: IStyleMap

    Returns void

text

  • get text(): string
  • set text(val: string): void
  • 富文本的xml文本内容

    memberof

    UIRichText

    Returns string

  • 富文本的xml文本内容

    Parameters

    • val: string

    Returns void

underline

  • get underline(): number
  • set underline(val: number): void
  • Returns number

  • Parameters

    • val: number

    Returns void

underlineColor

  • get underlineColor(): Color
  • set underlineColor(val: Color): void
  • Returns Color

  • Parameters

    Returns void

valign

  • Returns TextVAlign

  • Parameters

    Returns void

visible

  • get visible(): boolean
  • set visible(val: boolean): void
  • 渲染组件是否具体渲染

    Returns boolean

  • 渲染组件是否具体渲染

    overload
    memberof

    Renderable2D

    Parameters

    • val: boolean

    Returns void

wordWrap

  • get wordWrap(): boolean
  • set wordWrap(val: boolean): void
  • Returns boolean

  • Parameters

    • val: boolean

    Returns void

zOrder

  • get zOrder(): number
  • set zOrder(val: number): void
  • 渲染组件在同级的渲染顺序

    Returns number

  • 渲染组件在同级的渲染顺序

    overload
    memberof

    Renderable2D

    Parameters

    • val: number

    Returns void

Static style

  • get style(): IStyleMap
  • set style(style: IStyleMap): void
  • 获取富文本全局样式表

    static
    memberof

    UIRichText

    Returns IStyleMap

  • 富文本全局样式表切换设置(移除原有所有样式)

    static
    memberof

    UIRichText

    Parameters

    • style: IStyleMap

    Returns void

Methods

bindNodeWithTransform

  • bindNodeWithTransform(nodeId: number, nodeTransform: Transform2D): void
  • Parameters

    Returns void

destroy

  • destroy(): void
  • Returns void

getMaterialAtIndex

  • getMaterialAtIndex(index?: number): FakeMaterial
  • Parameters

    • index: number = 0

    Returns FakeMaterial

getMaterialCount

  • getMaterialCount(): number

getTypeName

  • getTypeName(): string
  • Returns string

isDetached

  • isDetached(): boolean
  • Returns boolean

redraw

  • redraw(): void
  • 强制重绘。异步操作,下一帧才会重绘。

    memberof

    UIRichText

    Returns void

resetProperties

  • resetProperties(): void

setMaterialDirty

  • setMaterialDirty(): void
  • 对外暴露的,将渲染元素对应RenderDraw的材质信息置脏

    Returns void

setTextDirty

  • setTextDirty(): void
  • Returns void

setVertexDirty

  • setVertexDirty(): void
  • 对外暴露的,将渲染元素对应RenderDraw的顶点数据置脏逻辑

    Returns void

Static setStyle

  • setStyle(style: IStyleMap): void
  • 富文本设置的全局样式方法设置(继承并替换原有样式)

    static
    memberof

    UIRichText

    Parameters

    • style: IStyleMap

    Returns void

Generated using TypeDoc