menuitem( index, [label,] [callback] )
Adds a custom item to the PICO-8 menu.
The item index, a number between 1 and 5.

The label text of the menu item to add or change.

A Lua function to call when the user selects this menu item.

To remove a previously added item, call menuitem(i) where i is the index of the item to remove.

Examples[edit | edit source]

menuitem(1, "restart puzzle", function() reset_puzzle() sfx(10) end)

function display_hints()
  hint_shown = level_id
menuitem(2, "show hints", display_hints)

See also[edit | edit source]

Community content is available under CC-BY-SA unless otherwise noted.