I am working on making another program and needed to port some old code from computer craft so I figured I may as well share. This file conaints 2 types of menus, a vertical list which takes an array and optional header text, and a yes/no style menu that can be customized.
local term = require("term")
local event = require("event")
local methods = {}
function methods.list(m, header)
header = header or "Menu List"
n=1
while(true) do
term.clear()
term.setCursor(1,1)
term.write(header)
term.setCursor(1,2)
for i=1, #m, 1 do
if(i==n) then
term.write