Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- startMenu = 0
- RCM = 0
- function draw()
- dbfr = fs.open("/home/gui/data", "r")
- x, z = term.getSize()
- color = dbfr.readAll()
- if color == "orange" then
- paintutils.drawFilledBox(1, 1, x, z, colors.orange)
- else
- paintutils.drawFilledBox(1, 1, x, z, colors.black)
- end
- dbfr.close()
- --paintutils.drawFilledBox(1, 1, 6, 19, colors.orange)
- paintutils.drawFilledBox(x-10, 1, x, z, colors.red)
- paintutils.drawFilledBox(1, 1, x, 1, colors.gray )
- paintutils.drawFilledBox(1, 1, 7, 1, colors.lightGray )
- paintutils.drawFilledBox(x-8, 3, x-2, 7, colors.lightGray)
- term.setCursorPos(x-9, 8)
- term.setBackgroundColor(colors.red)
- term.write("customize")
- term.setCursorPos(1, 1)
- term.setBackgroundColor(colors.gray)
- term.setTextColor( colors.white )
- term.write("[Start]")
- term.setBackgroundColor( colors.gray )
- term.setCursorPos(z - 5, 1)
- term.write("Storage Used: " .. 1048576 - fs.getFreeSpace("/") .. "/1048576")
- end
- function drawMenu()
- paintutils.drawFilledBox(1, 2, 7, 6, colors.lightGray)
- term.setCursorPos(1, 2)
- term.write("[Term]")
- term.setCursorPos(1, 3)
- term.write("[Files]")
- term.setCursorPos(1, 4)
- term.write("[Quest]")
- term.setCursorPos(1, 5)
- term.write("[Text]")
- end
- function drawRCM(x, y)
- paintutils.drawFilledBox(x, y, x+7, y+6, colors.lightGray)
- end
- draw()
- while true do
- event, button, x, y = os.pullEvent()
- if event then
- if button == 1 then
- x2, y2 = term.getSize()
- if x < 7 and y == 1 then
- if startMenu == 0 then
- drawMenu()
- startMenu = 1
- else
- draw()
- startMenu = 0
- end
- elseif x < 7 and y == 2 and startMenu == 1 then
- x, y = term.getCursorPos()
- paintutils.drawFilledBox(1, 1, x, y, colors.black)
- shell.run("clear")
- shell.run("/home/term term")
- elseif x < 7 and y == 3 and startMenu == 1 then
- a = shell.run("/home/Files")
- draw()
- elseif x < 7 and y == 4 and startMenu == 1 then
- a = shell.run("/home/apps/quest")
- draw()
- elseif x < 7 and y == 5 and startMenu == 1 then
- a = shell.run("/home/luaide")
- draw()
- elseif x > x2-10 and y < 8 and y > 5 then
- a = shell.run("/home/gui/customize")
- end
- elseif button == 2 then
- if RCM == 0 then
- --drawRCM(x, y)
- RCM = 1
- else
- --draw()
- RCM = 0
- end
- end
- end
- end
- dbf = fs.open("/home/gui/data", "w")
Advertisement
Add Comment
Please, Sign In to add comment