Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function writeColor(b,g,s)
- term.setTextColour(b)
- term.setBackgroundColour(g)
- term.write(s)
- term.setTextColour(colours.white)
- term.setBackgroundColour(colours.black)
- end
- term.clear()
- term.setCursorPos(1,1)
- pos = {
- fold1_pos_x = 1;
- fold1_pos_y = 1;
- }
- writeColor(colours.black,colours.yellow,">")
- menu_fold1_activated = false
- function menu_fold1()
- term.setCursorPos(2,1)
- writeColor("Exit")
- menu_fold1_activated = true
- end
- while true do
- local button, xPos, yPos = os.pullEvent("mouse_click")
- if(xPos == 1 and yPos == 1) then
- menu_fold1()
- end
- if(xPos == 1 and yPos == 5 and menu_fold1_activated == true or xPos == 1 and yPos == 6 and menu_fold1_activated == true or xPos == 1 and yPos == 7 and menu_fold1_activated == true or xPos == 1 and yPos == 8 and menu_fold1_activated == true or xPos == 1 and yPos == 9 and menu_fold1_activated == true) then
- term.clear()
- error("Closed LightweightOS v1.04")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement