Advertisement
SpitefulJames

Button Page.lua

Apr 23rd, 2021
728
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.88 KB | None | 0 0
  1. os.loadAPI("gui")
  2. pChest = peripheral
  3.  
  4.  
  5.  
  6. -- gui.addButton("name",func,xmin,xmax,ymin,ymax,colors.blue,colors.yellow)
  7. gui.addButton("Nether",nether,10,20,7,7,colors.blue,colors.yellow)
  8. gui.addButton("End",theEnd,10,20,9,9,colors.blue,colors.yellow)
  9. gui.addButton("Test3",test3,10,20,11,11,colors.blue,colors.yellow)
  10. gui.addButton("Test4",test4,10,20,13,13,colors.blue,colors.yellow)
  11. gui.screenButton()
  12.  
  13. function getClick()
  14.     event,side,x,y = os.pullEvent("monitor_touch")
  15.     gui.checkxy(x,y)
  16. end
  17.  
  18. function nether()
  19.     gui.flash("Nether")
  20.     print("Nether")
  21. end
  22.  
  23. function theEnd()
  24.     gui.flash("End")
  25.         print("theEnd")
  26. end
  27. function test3()
  28.     gui.flash("Test3")
  29.         print("test3")
  30. end
  31.  
  32. function test4()
  33.     gui.flash("Test4")
  34.         print("test4")
  35. end
  36. gui.heading("DEMO PROGRAM W.I.P")
  37. gui.label(1,5,"Demo")
  38.  
  39. while true do
  40. getClick()
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement