Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Label

ラベルUI

classdesc

ラベルUIクラス

constructor
memberof

FrameWork

extends

enchant.Label

Hierarchy

  • Label
    • Label

Index

Constructors

constructor

  • new Label(parent: Group): Label
  • コンストラクタ

    method
    name

    UIParts.Label#Label

    Parameters

    • parent: Group

      Group

    Returns Label

Properties

backgroundColor

backgroundColor: string

The Entity background color. Must be provided in the same format as the CSS 'color' property.

type

String

color

color: string

Text color settings. Can be set according to the format of the CSS 'color' property.

type

String

debugColor

debugColor: string

The Entity debug color. Must be provided in the same format as the CSS 'color' property.

type

String

font

font: string

Font settings. Can be set according to the format of the CSS 'font' property.

type

String

height

height: number

The height of the Entity.

type

Number

opacity

opacity: number

The transparency of this entity. Defines the transparency level from 0 to 1 (0 is completely transparent, 1 is completely opaque).

type

Number

originX

originX: number

The point of origin used for rotation and scaling.

type

Number

originY

originY: number

The point of origin used for rotation and scaling.

type

Number

rotation

rotation: number

Entity rotation angle (degree).

type

Number

scaleX

scaleX: number

Scaling factor on the x axis of this Entity.

type

Number

scaleY

scaleY: number

Scaling factor on the y axis of this Entity.

type

Number

text

text: string

textAlign

textAlign: string

Specifies horizontal alignment of text. Can be set according to the format of the CSS 'text-align' property.

type

String

touchEnabled

touchEnabled: boolean

Indicates whether or not this Entity can be touched.

type

Boolean

visible

visible: boolean

Indicates whether or not to display this Entity.

type

Boolean

width

width: number

The width of the Entity.

type

Number

x

x: number

x coordinates of the Node.

type

Number

y

y: number

y coordinates of the Node.

type

Number

Methods

addEventListener

  • addEventListener(type: string, listener: function): void
  • Add a new event listener which will be executed when the event is dispatched.

    Parameters

    • type: string

      Type of the events.

    • listener: function

      Event listener to be added.

        • (e: Event): void
        • Parameters

          • e: Event

          Returns void

    Returns void

clearEventListener

  • clearEventListener(type: string): any
  • Clear all defined event listeners of a given type. If no type is given, all listeners will be removed.

    Parameters

    • type: string

      Type of the events.

    Returns any

disableCollection

  • disableCollection(): any

dispatchEvent

  • dispatchEvent(e: Event): any
  • Issue an event.

    Parameters

    • e: Event

      Event to be issued.

    Returns any

enableCollection

  • enableCollection(): any

getBoundingRect

  • getBoundingRect(): object
  • Returns object

    • height: number
    • left: number
    • top: number
    • width: number

getOrientedBoundingRect

  • getOrientedBoundingRect(): object
  • Returns object

    • leftBottom: number
    • leftTop: number
    • rightBottom: number
    • rightTop: number

intersect

  • intersect(other: Entity): boolean
  • Performs a collision detection based on whether or not the bounding rectangles are intersecting.

    Parameters

    • other: Entity

      An object like Entity, with the properties x, y, width, height, which are used for the collision detection.

    Returns boolean

    True, if a collision was detected.

moveBy

  • moveBy(x: any, y: any): any
  • Move the Node relative to its current position.

    Parameters

    • x: any

      x axis movement distance.

    • y: any

      y axis movement distance.

    Returns any

moveTo

  • moveTo(x: any, y: any): any
  • Move the Node to the given target location.

    Parameters

    • x: any

      Target x coordinates.

    • y: any

      Target y coordinates.

    Returns any

on

  • on(eventName: string, func: function): any
  • Synonym for addEventListener.

    see

    enchant.EventTarget#addEventListener

    Parameters

    • eventName: string
    • func: function
        • (arg: any): void
        • Parameters

          • arg: any

          Returns void

    Returns any

remove

  • remove(): any

removeEventListener

  • removeEventListener(type: string, listener: function): void
  • Delete an event listener.

    Parameters

    • type: string
    • listener: function

      Event listener to be deleted.

        • (e: Event): void
        • Parameters

          • e: Event

          Returns void

    Returns void

rotate

  • rotate(deg: number): any
  • Rotate this Entity.

    Parameters

    • deg: number

      Rotation angle (degree).

    Returns any

scale

  • scale(x: number, y: number): any
  • Enlarges or shrinks this Entity.

    Parameters

    • x: number

      Scaling factor on the x axis.

    • y: number

    Returns any

within

  • within(other: Entity, distance: number): boolean
  • Performs a collision detection based on distance from the Entity's central point.

    Parameters

    • other: Entity

      An object like Entity, with properties x, y, width, height, which are used for the collision detection.

    • distance: number

    Returns boolean

    True, if a collision was detected.

Generated using TypeDoc