Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ver = ("Spawner Operating System")
- m = peripheral.wrap("right")
- w,h = m.getSize()
- --function
- function cenText(text, y)
- m.setCursorPos(math.floor(w - #text) / 2, y)
- print(text)
- end
- function title()
- m.setCursorPos(1,1)
- m.clear()
- m.setBackgroundColor(colors.black)
- m.setTextColor(colors.yellow)
- cenText(ver,1)
- end
- function mainMenu()
- title()
- m.setBackgroundColor(colors.black)
- m.setTextColor(colors.white)
- cenText("{ Open Operating System }",7)
- cenText("{ Reboot }",9)
- cenText("{ Future Improvments}", 11)
- m.setCursorPos(0,0)
- end
- mainMenu()
- while true do
- local event, button, X, Y = os.pullEventRaw()
- if event == "mouse_click" then
- if X >= 13 and X <= 37 and Y == 7 and button == 1 then
- print("awesome")
- elseif X >= 20 and X <= 29 and Y == 9 and button == 1 then
- print("YES")
- elseif X >= 14 and X <= 36 and Y ==11 and button == 1 then
- print("working")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement