API Docs for: 1.4.0
Show:

Kiwi.HUD.Widget.MenuItem Class

Module: Widget
Parent Module: HUD

A MenuItem extends the Button Widget and is typically contained inside of a Menu Widget. Since a MenuItem extends the Button Widget you can access the Input Component that it has to listen to mouse events.

Constructor

Kiwi.HUD.Widget.MenuItem

(
  • game
  • text
  • x
  • y
)
Kiwi.HUD.Widget.MenuItem

Parameters:

  • game Kiwi.Game

    The game that this MenuItem belongs to.

  • text String

    The text that is to be inside the menuitem.

  • x Number

    The position of this menu item on the x-axis.

  • y Number

    The position of this menu item on the y-axis.

Item Index

Methods

Properties

Methods

objType

() String public

The type of object that this is.

Returns:

String:

"MenuItem"

Properties

input

Kiwi.HUD.HUDComponents.WidgetInput public

The WidgetInput component that handles the management of events for this button.

menu

Kiwi.HUD.Widget.Menu public

The Menu that this belongs to.