UiActionListener

Anything a Button or MenuList reports clicks to: a scene, an entity, or a plain object. Set Button.listener (or MenuList.listener) to it, and give each button an actionId.


Instance Methods

onUiAction(actionId: string, button: BGE.UI.Button): void

Called when a button with this listener is clicked.

Parameters

  • actionId (string) — the clicked button's actionId
  • button (BGE.UI.Button) — the clicked button (its value holds any extra data)

Returns

  • void