Fandom

Pico-8 Wiki

Menuitem

162pages on
this wiki
Add New Page
Comments0 Share
menuitem( index, [label,] [callback] )

Adds a custom item to the Pico-8 menu.

index
The item index, a number between 1 and 5.
label
The label text of the menu item to add or change.
callback
A Lua function to call when the user selects this menu item.

Examples Edit

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

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

See also Edit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.