local bundelSide = "bottom"
local colorUp = "white"
local colorDown = "magenta"
local colorEnter = "orange"
local function menu(...) -- ver 0.1
local sel = 1
local list = {...}
local offX,offY = term.getCursorPos()
local curX,curY = term.getCursorPos()
while true do
if sel > #list then sel = 1 end
if sel < 1 then sel = #list end
for i = 1,#list do
term.setCursorPos(offX,offY+i-1)
if sel == i then
print("->"..list[i].."<-")
else
print(list[i].." ")
end
end
while true do
local e,e1,e2,e3,e4,e5 = os.pullEvent()
if e == "redstone" then
local iInput = rs.getBundledInput(bundelSide)
if colors.test(iInput,colors[colorUp]) then
sel = sel-1
break
elseif colors.test(iInput,colors[colorDown]) then
sel = sel+1
break
elseif colors.test(iInput,colors[colorEnter]) then
term.setCursorPos(curX,curY)
return list[sel],sel
end
end
--[[if e == "key" then
if e1 == 200 then -- up key
sel = sel-1
break
end
if e1 == 208 then -- down key
sel = sel+1
break
end
if e1 == 28 then
term.setCursorPos(curX,curY)
return list[sel],sel
end
end--]]
end
end
end
term.clear()
term.setCursorPos(1,1)
print("Please select a world")
local selection = menu("Strip Mine","Frame Quarry","Dcleondc's world","Laxman69j's world","Nether","Mushroom Kindom")
term.clear()
term.setCursorPos(1,1)
print("User Selected : "..selection)