Class: Mensaje

MM. Mensaje

Render de mensajes de texto.

new Mensaje(escenario, capa, propiedades)

Parameters:
Name Type Description
escenario stage Escenario donde pintar el mensaje
capa layer Capa donde pintar el grid
propiedades Object Conjunto de propiedades a establecer al mensaje. Como Color fuente, posición, etc. Ver refencia Kinetic.Text.
Source:

Members

<static> defecto

Valores por defecto para el texto
Source:

Methods

getHeight() → {number}

Obtiene el alto del texto.
Source:
Returns:
Alto del texto.
Type
number

getText() → {String}

Texto del mensaje
Source:
Returns:
texto actual del mensaje
Type
String

getWidth() → {number}

Obtiene el ancho del texto.
Source:
Returns:
Ancho del texto.
Type
number

getX() → {number}

Obtiene la posición X absoluta del texto
Source:
Returns:
posición X del mensaje.
Type
number

getY() → {number}

Obtiene la posición Y absoluta del texto
Source:
Returns:
posición Y del mensaje.
Type
number

setText(texto)

Cambia el texto del mensaje
Parameters:
Name Type Description
texto String Nuevo texto
Source:

setX(x)

Mueve el esto a la posición x de la capa o contenedor
Parameters:
Name Type Description
x number Posición en el eje x del texto
Source:

setY(x)

Mueve el esto a la posición x de la capa o contenedor
Parameters:
Name Type Description
x number Posición en el eje x del texto
Source: