MenuItem

One item in a BGE.UI.MenuList.

Properties

  • id (string) — Passed to the listener as the button's actionId.
  • label (string)
  • enabled (boolean) — A disabled item is shown dimmed and can't be focused or picked.
  • value (dynamic) — Copied to the button's value.
  • onActivate (function | dynamic) — Copied to the button's onActivate.

Constructor

new MenuItem( id: string, label: string, enabled?: boolean, value?: dynamic, ): MenuItem

Parameters

  • id (string)
  • label (string)
  • enabled (boolean, optional, default: true)
  • value (dynamic, optional, default: "invalid")