Advertisement
Guest User

Startup.lua

a guest
Apr 24th, 2015
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. local calendar=true
  2. nYear,sMonth,nDay,sDay,nDayWeek,nMonth=nil,nil,nil,nil,nil,nil      
  3. Draw.clear(256)
  4. Draw.setStatusColor(128)
  5. Draw.status()
  6. term.setTextColor(1)
  7. if not Time then os.loadAPI("System/API/Time") end
  8. nYear,sMonth,nDay,sDay,nDayWeek,nMonth=Time.date(os.day())
  9. term.setCursorPos(1,2)
  10. Draw.cprint("&0$8 Today is "..sDay..",\n "..sMonth..nDay..", year "..nYear)
  11. term.setCursorPos((Screen.Width-4)/2,Screen.Height)
  12. write("Back")
  13. while calendar do
  14. tEvent={os.pullEventRaw()}
  15. if tEvent[1]=="mouse_click" and tEvent[4]==Screen.Height then calendar=false term.setTextColor(1) term.setBackgroundColor(32768) term.setCursorPos(1,1) end
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement