Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local w,h = term.getSize()
- function drawWindow()
- local tbarC = colors.lightBlue
- local tBartC = colors.white
- term.setBackgroundColor(colors.white)
- term.clear()
- term.setCursorPos(1,1)
- term.setBackgroundColor(tbarC)
- term.setTextColor(tBartC)
- term.clearLine()
- term.setCursorPos(2,1)
- write("News")
- term.setCursorPos(w,1)
- term.setBackgroundColor(colors.red)
- print("X")
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.gray)
- end
- function titleBar()
- term.setCursorPos(1,h)
- term.setBackgroundColor(tBarC)
- term.setTextColor(tBartC)
- term.clearLine()
- term.setTextColor(tBartC)
- term.setCursorPos(1, h)
- write(" Menu ")
- end
- function menu()
- term.setTextColor(colors.gray)
- term.setBackgroundColor(colors.white)
- term.setCursorPos(1,2)
- print("MarcoSoft news")
- print(" ")
- print("M-OS 1.1.4 (posted 3/5/17)")
- print("M-OS 1.2 is coming soon!")
- print(" ")
- print("New features:")
- print(" ")
- print("- App store")
- print("- New programs menu")
- print("- Crash Screen")
- print(" ")
- end
- drawWindow()
- titleBar()
- menu()
- while true do
- local event, button, X, Y = os.pullEvent()
- if event == "mouse_click" then
- if X == w and Y==1 and button ==1 then
- term.clear()
- fs.delete("m-os/programs/.latestNews")
- shell.run("m-os/desktop")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement