monitor = peripheral.wrap("monitor_1")
function pos(...) return term.setCursorPos(...) end
function cls(...) return term.clear() end
function tCol(...) return term.setTextColor(...) end
function bCol(...) return term.setBackgroundColor(...) end
function box(...) return paintutils.drawFilledBox(...) end
function line(...) return paintutils.drawLine(...) end
function write(...) return term.write(...) end
term.redirect(monitor)
w, h = monitor.getSize()
function getSize() w,h = monitor.getSize() end
tCol(colors.white)
local darkmode = true
local darkmodec
local boolArray = {false,false,false,false,false}
local function nether()
monitor.setTextScale(1.5)
getSize()
cls()
if darkmode then
darkmodec = colours.black
else
darkmodec = colours.blue
end
box(1,1,w,h,darkmodec)
pos(w/2-#"NETHER"/2,1)
write("NETHER")
pos(5,3)
write("Obsidian")
if boolArray[1]==false then box(23,3,26,3,colors.red) else box(23,3,26,3,colors.lime) end
pos(5,5)
bCol(darkmodec) write("Blaze Powder")
if boolArray[2]==false then box(23,5,26,5,colors.red) else box(23,5,26,5,colors.lime) end
pos(5,7)
bCol(darkmodec) write("Night Vision")
if boolArray[3]==false then box(23,7,26,7,colors.red) else box(23,7,26,7,colors.lime) end
pos(5,9)
bCol(darkmodec) write("Glow Stone")
if boolArray[4]==false then box(23,9,26,9,colors.red) else box(23,9,26,9,colors.lime) end
pos(5,11)
bCol(darkmodec) write("Netherrack Dust")
if boolArray[5]==false then box(23,11,26,11,colors.red) else box(23,11,26,11,colors.lime) end
pos(1,h) bCol(colors.black) write("EXIT")
while true do
local event, button, mx, my = os.pullEvent()
if event == "monitor_touch" then
if mx >= 1 and mx <= (1+#"EXIT") and my == h then return "menu" end
for i=1,5 do
if mx >= 23 and mx <= 26 and my == (1 + i*2) then boolArray[i]=not boolArray[i]; nether() end
end
if mx >= w/2-#"NETHER"/2 and mx <= w/2+#"NETHER"/2 and my == 1 then darkmode = not darkmode; nether() end
end
end
end
return {nether = nether}