Advertisement
hevohevo

April fool joke: Surface? No! Pocket Computer

Apr 1st, 2014
355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.09 KB | None | 0 0
  1. -- ###############################
  2. -- Surface? No! Pocket Computer
  3. -- version. april fool joke
  4. -- http://hevohevo.hatenablog.com/
  5.  
  6. -- Falling is a great game!
  7.  
  8. while true do
  9.  
  10.   term.clear()
  11.   term.setCursorPos(1,1)
  12.   term.write("Start                hevo2")
  13.  
  14.   -- maxX=26, maxY=20
  15.   local win1 = window.create(term.current(), 2, 3, 11, 5, true)
  16.   local win1a = window.create(term.current(), 2, 9, 5, 5, true)
  17.   local win1b = window.create(term.current(), 8, 9, 5, 5, true)
  18.   local win1c = window.create(term.current(), 2, 15, 5, 5, true)
  19.   local win1d = window.create(term.current(), 8, 15, 5, 5, true)
  20.  
  21.   local win2 = window.create(term.current(), 14, 3, 11, 5, true)
  22.   local win2a = window.create(term.current(), 14, 9, 11, 5, true)
  23.   local win2b = window.create(term.current(), 14, 15, 11, 5, true)
  24.  
  25.   win1.setBackgroundColor(colors.cyan)
  26.   win1.clear()
  27.   win1.setCursorPos(1,2)
  28.   win1.write(" Microsooft")
  29.   win1.setCursorPos(1,3)
  30.   win1.write("   Surface")
  31.  
  32.   win1a.setBackgroundColor(colors.blue)
  33.   win1a.clear()
  34.   win1a.setCursorPos(1,3)
  35.   win1a.write(" lua")
  36.  
  37.   win1b.setBackgroundColor(colors.red)
  38.   win1b.clear()
  39.   win1b.setCursorPos(1,3)
  40.   win1b.write(" Mail")
  41.  
  42.   win1c.setBackgroundColor(colors.lightBlue)
  43.   win1c.clear()
  44.   win1c.setCursorPos(1,3)
  45.   win1c.write("  ?")
  46.  
  47.   win1d.setBackgroundColor(colors.magenta)
  48.   win1d.clear()
  49.   win1d.setCursorPos(1,3)
  50.   win1d.write(" Chat")
  51.  
  52.   win2.setBackgroundColor(colors.purple)
  53.   win2.clear()
  54.   win2.setCursorPos(1,2)
  55.   win2.write("  1/4/2014")
  56.  
  57.   win2a.setBackgroundColor(colors.green)
  58.   win2a.clear()
  59.   win2a.setCursorPos(1,3)
  60.   win2a.write("   Paint")
  61.  
  62.   win2b.setBackgroundColor(colors.orange)
  63.   win2b.clear()
  64.   win2b.setCursorPos(1,3)
  65.   win2b.write("  Falling")
  66.  
  67.   term.setCursorPos(1,20)
  68.  
  69.   while true do
  70.     local event, b, x, y = os.pullEvent("mouse_click")
  71.     if b==1 then
  72.       if (x >= 14 and x <= 25) and (y >= 15 and y <= 20) then
  73.         shell.run("falling")
  74.         break
  75.       elseif (x >= 1 and x <= 5) and y==1 then
  76.         os.reboot()
  77.       end
  78.     end
  79.   end
  80.  
  81. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement