Advertisement
k_goos

HomeServer

Jan 18th, 2015
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1. os.loadAPI("GuiAPI")
  2.  
  3. local monitor
  4.  
  5. function Start()
  6.     print("Init")
  7.     monitor = GuiAPI.initMonitor()
  8.     GuiAPI.initEventHandler(EventHandler, Main)
  9. end
  10. function EventHandler()
  11.     while true do
  12.         local event, name, x, y = os.pullEvent("button")
  13.         print("Event: " .. event .. " Name: " .. name .. " X: " .. x .. " Y: " .. y)
  14.     end
  15. end
  16. function MenuBar()
  17.     print("add menubar")
  18.     GuiAPI.addButtonMain("home", 1, 1, 12, 3, "Home")
  19.     GuiAPI.addButtonMain("frameQuarry", 14, 1, 15, 3, "Framequarry")
  20. end
  21. function Main()
  22.     MenuBar()
  23.                
  24.     GuiAPI.draw()
  25. end
  26.  
  27. Start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement