Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bg = paintutils.loadImage("myOS/icons/bg.nfp")
- function drawDesktop()
- term.setBackgroundColor(colors.lightBlue);
- term.clear();
- paintutils.drawImage(bg,1,2)
- term.setCursorPos(1,1)
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- print("PC | ")
- paintutils.drawPixel(51,1,colors.red)
- term.setCursorPos(51,1)
- term.setTextColor(colors.white)
- print("X")
- end
- running = true;
- state = false;
- while running do
- drawDesktop();
- event, button, x, y = os.pullEvent("mouse_click");
- if event == "mouse_click" then
- if (x == 1 or x == 2 or x == 3) and y == 1 then
- while true do
- paintutils.drawFilledBox(1,2,4,4,colors.white);
- term.setCursorPos(1,2);
- print("reboot");
- term.setCursorPos(1,3);
- print("shutdown");
- term.setCursorPos(1,4);
- print("To prompt");
- event,button,x,y = os.pullEvent("mouse_click");
- if event == "mouse_click" then
- break;
- end
- end
- end
- end
- end
- term.clear();
- term.setCursorPos(1,1);
- shell.run("cd myOS")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement