Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UILabel

Hierarchy

Index

Constructors

constructor

  • new UILabel(entity: Entity2D): UILabel
  • Parameters

    • entity: Entity2D

    Returns UILabel

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 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

    UILabel

    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

text

  • Returns string | OpenData

  • Parameters

    Returns void

underline

  • get underline(): number
  • set underline(val: number): void
  • 下划线的宽度

    memberof

    UILabel

    Returns number

  • 下划线的宽度

    Parameters

    • val: number

    Returns void

underlineColor

  • get underlineColor(): Color
  • set underlineColor(val: Color): void
  • 下划线的颜色

    memberof

    UILabel

    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

Methods

destroy

  • destroy(): void
  • Returns void

getMaterialAtIndex

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

    • index: number = 0

    Returns FakeMaterial

getMaterialCount

  • getMaterialCount(): number
  • Returns number

getTypeName

  • getTypeName(): string
  • Returns string

isDetached

  • isDetached(): boolean
  • Returns boolean

resetProperties

  • resetProperties(): void
  • Returns void

setMaterialDirty

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

    Returns void

setTextDirty

  • setTextDirty(): void
  • Returns void

setVertexDirty

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

    Returns void

Generated using TypeDoc