Class Fz2D.Gui.Button

Defined in: src/scene/objects/gui/button.coffee
Inherits: Fz2D.Entity

Overview

Public: Button

Subclasses

Fz2D.Gui.TextButton

Instance Method Summary

Inherited Method Summary

Methods inherited from Fz2D.Entity

.constructor, .isOutOfBounds, .play, .stop, .is, .active, .addAnimation, .draw, .update

Methods inherited from Fz2D.Object

.constructor, .kill, .reset, .show, .hide, .draw, .update

Constructor Details

::constructor(x, y, up, down = up, over = down) Source

Public: Constructor x - position on the X axis y - position on the Y axis up - Fz2D.Texture down - Fz2D.Texture (default: up) over - Fz2D.Texture (default: down)

Parameters:

  • xposition on the X axis
  • yposition on the Y axis
  • (Fz2D.Texture) upFz2D.Texture
  • (Fz2D.Texture) downFz2D.Texture (default: up)
  • (Fz2D.Texture) overFz2D.Texture (default: down)

Instance Method Details

::onclick(button) Source

Public: On click(ed) callback. button - Fz2D.Gui.Button

Parameters:

::update(timer, input) Source

Public: Updates button on every frame. timer - Fz2D.Timer input - Fz2D.Input

Parameters: