Options
All
  • Public
  • Public/Protected
  • All
Menu

Component for UI buttons.

Hierarchy

Index

Constructors

constructor

  • Parameters

    • Optional sprite2DRenderer: Entity
    • Optional transition: Entity

    Returns Button

Properties

sprite2DRenderer

sprite2DRenderer: Entity

Reference to an entity with a Sprite2DRenderer component that represents the button's default state. Mouse/touch interaction, captured by the MouseInteraction component, swaps or modifies the sprite based on the type of transition you apply. If this is set to NONE, it assumes that the underlying entity (the one that the Button component is attached to) also has a Sprite2DRenderer component, and uses that.

transition

transition: Entity

Reference to an entity that defines visual transitions based on mouse/ touch interaction captured by the MouseInteraction component. For example, A SpriteTransition or ColorTintTransition component.

Static _isSharedComp

_isSharedComp: boolean

Static _size

_size: number

Static _view

_view: any

Static cid

cid: number

Static sprite2DRenderer

sprite2DRenderer: EntityComponentFieldDesc

Static transition

transition: EntityComponentFieldDesc

Methods

Static _dtorFn

  • Parameters

    Returns void

Static _fromPtr

  • Parameters

    • p: number
    • Optional v: Button

    Returns Button

Static _tempHeapPtr

  • _tempHeapPtr(v: Button): number
  • Parameters

    Returns number

Static _toPtr

  • _toPtr(p: number, v: Button): void
  • Parameters

    Returns void

Generated using TypeDoc