Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • TextBox

Index

Constructors

constructor

Accessors

animation

  • get animation(): Tween
  • set animation(value: Tween): void
  • Returns Tween

  • Parameters

    • value: Tween

    Returns void

backgroundAlpha

  • get backgroundAlpha(): number
  • set backgroundAlpha(backgroundAlpha: number): void
  • Returns number

  • Parameters

    • backgroundAlpha: number

    Returns void

backgroundColor

  • get backgroundColor(): number
  • set backgroundColor(backgroundColor: number): void
  • Returns number

  • Parameters

    • backgroundColor: number

    Returns void

borderInstance

  • get borderInstance(): Image
  • set borderInstance(borderInstance: Image): void
  • Returns Image

  • Parameters

    • borderInstance: Image

    Returns void

boxHeight

  • get boxHeight(): number
  • set boxHeight(height: number): void
  • Returns number

  • Parameters

    • height: number

    Returns void

boxInstance

  • get boxInstance(): Image
  • set boxInstance(boxInstance: Image): void
  • Returns Image

  • Parameters

    • boxInstance: Image

    Returns void

boxLineColor

  • get boxLineColor(): number
  • set boxLineColor(lineColor: number): void
  • Returns number

  • Parameters

    • lineColor: number

    Returns void

boxLineWidth

  • get boxLineWidth(): number
  • set boxLineWidth(lineWidth: number): void
  • Returns number

  • Parameters

    • lineWidth: number

    Returns void

boxPadding

  • get boxPadding(): number
  • set boxPadding(padding: number): void
  • Returns number

  • Parameters

    • padding: number

    Returns void

boxPositionX

  • get boxPositionX(): number
  • set boxPositionX(pos: number): void
  • Returns number

  • Parameters

    • pos: number

    Returns void

boxPositionY

  • get boxPositionY(): number
  • set boxPositionY(pos: number): void
  • Returns number

  • Parameters

    • pos: number

    Returns void

boxWidth

  • get boxWidth(): number
  • set boxWidth(width: number): void
  • Returns number

  • Parameters

    • width: number

    Returns void

context

  • get context(): any
  • set context(value: any): void
  • Returns any

  • Parameters

    • value: any

    Returns void

fontMetrics

  • get fontMetrics(): any
  • set fontMetrics(value: any): void
  • Returns any

  • Parameters

    • value: any

    Returns void

game

  • get game(): Game
  • set game(value: Game): void
  • Returns Game

  • Parameters

    • value: Game

    Returns void

shouldFillBoxBackground

  • get shouldFillBoxBackground(): boolean
  • set shouldFillBoxBackground(backgroundColor: boolean): void
  • Returns boolean

  • Parameters

    • backgroundColor: boolean

    Returns void

shouldShowTrash

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

  • Parameters

    • value: boolean

    Returns void

textColor

  • get textColor(): number
  • set textColor(textColor: number): void
  • Returns number

  • Parameters

    • textColor: number

    Returns void

textFont

  • get textFont(): string
  • set textFont(value: string): void
  • Returns string

  • Parameters

    • value: string

    Returns void

textFontSize

  • get textFontSize(): number
  • set textFontSize(textFontSize: number): void
  • Returns number

  • Parameters

    • textFontSize: number

    Returns void

textInstance

  • get textInstance(): Text
  • set textInstance(textInstance: Text): void
  • Returns Text

  • Parameters

    • textInstance: Text

    Returns void

textLineSpacing

  • get textLineSpacing(): number
  • set textLineSpacing(value: number): void
  • Returns number

  • Parameters

    • value: number

    Returns void

textStatic

  • get textStatic(): string
  • set textStatic(textStatic: string): void
  • Returns string

  • Parameters

    • textStatic: string

    Returns void

textWeight

  • get textWeight(): string
  • set textWeight(value: string): void
  • Returns string

  • Parameters

    • value: string

    Returns void

trashCan

  • get trashCan(): Sprite
  • set trashCan(value: Sprite): void
  • Returns Sprite

  • Parameters

    • value: Sprite

    Returns void

trashCanColor

  • get trashCanColor(): number
  • set trashCanColor(value: number): void
  • Returns number

  • Parameters

    • value: number

    Returns void

trashCanImage

  • Returns ITrashCanImage

  • Parameters

    Returns void

trashCanOnInputDown

  • get trashCanOnInputDown(): Function
  • set trashCanOnInputDown(value: Function): void
  • Returns Function

  • Parameters

    • value: Function

    Returns void

trashCanScale

  • get trashCanScale(): number
  • set trashCanScale(value: number): void
  • Returns number

  • Parameters

    • value: number

    Returns void

Methods

createText

  • createText(initialText?: string): void

createTextBoundingBox

  • createTextBoundingBox(): void
    • create a background box with optional configurable fill and no border
    • create a border box with a configurable line border and no background fill
    • place border box over the top of the background box to create a bordered bounding box
    • maintain discrete access to both instances for manipulation

    Returns void

destroy

  • destroy(): void

getContext

  • getContext(): any

getFontMetrics

  • getFontMetrics(): any

getFontString

  • getFontString(): string
  • Build a font identifier string

    • uses the font based on the set TextBox properties
      • textWeight
      • text.textFontSize
      • textFont

    for example: "bold 24px 'Arial'"

    Returns string

    font ID string

getTextInfo

  • getTextInfo(): { width: number }

pause

  • pause(): void
  • Pause TextBox

    • when trashCan is present disable its input handler and hide it
    • stop the animation

    Returns void

resume

  • resume(): void
  • Resume TextBox

    • when trashCan is present enable its input handler and show it
    • start the animation

    Returns void

tintBackgroundOff

  • tintBackgroundOff(): void

tintBackgroundOn

  • tintBackgroundOn(tintColor: number): void