Log inGet started
Package

menu.module

Newest version

README.md

menu

recipeKit's craft menu for the local player. setup picks one of six THEMES (rustic, scifi, cartoon, pixel, minimal, cozy), one of the LAYOUTS (list, grid), the title and optional categories; open, close, toggle and isOpen show it; move, pick and refresh drive it. Every row is a button showing the recipe's cost, greyed when it cannot be made, with station recipes marked: a mouse click or tap crafts that row and hovering highlights it, and the mouse pointer is freed while the menu is open. step polls the keyboard and gamepad every frame: arrows or W and S (d-pad) move, left and right too in the grid, Enter or E (south, A) crafts, Escape (east, B) closes, and a held key repeats after 0.35 s. keyboard(on) turns the key handling on or off. Pure helpers nextIndex, dirDelta and repeatStep hold the movement and repeat rules. Used by the CraftMenu and RecipeGallery components and by games with their own controls.