Class: MenuButton

ui/UI~ MenuButton


A basic text button.

Parameters:
Name Type Description
x number
y number
text string
key string

object associated with button

func function

on click callback function

fontSize string
Properties:
Name Type Description
text Phaser.Text

modify this to change the text.

button Phaser.Button

modify this to change the button.

Source:

Methods


hide() → {any}

Hide a button and disable it

Source:
Returns:

returns itself

Type
any

hide() → {any}

Hide a button and disable it

Source:
Returns:

returns itself

Type
any

reveal() → {any}

Reveal the button and enable it

Source:
Returns:

returns itself

Type
any

reveal() → {any}

Reveal the button and enable it

Source:
Returns:

returns itself

Type
any

setLocation(x, y)

set the location of a MenuButton

Parameters:
Name Type Description
x number

x location

y number

location

Source:

setLocation(x, y)

set the location of a MenuButton

Parameters:
Name Type Description
x number

x location

y number

location

Source:

Class: MenuButton

ui/UI~ MenuButton


A basic text button.

Parameters:
Name Type Description
x number
y number
text string
key string

object associated with button

func function

on click callback function

fontSize string
Properties:
Name Type Description
text Phaser.Text

modify this to change the text.

button Phaser.Button

modify this to change the button.

Source:

Methods


hide() → {any}

Hide a button and disable it

Source:
Returns:

returns itself

Type
any

hide() → {any}

Hide a button and disable it

Source:
Returns:

returns itself

Type
any

reveal() → {any}

Reveal the button and enable it

Source:
Returns:

returns itself

Type
any

reveal() → {any}

Reveal the button and enable it

Source:
Returns:

returns itself

Type
any

setLocation(x, y)

set the location of a MenuButton

Parameters:
Name Type Description
x number

x location

y number

location

Source:

setLocation(x, y)

set the location of a MenuButton

Parameters:
Name Type Description
x number

x location

y number

location

Source: