Advertisement
Necrotico

CC GUI Test

Sep 9th, 2021 (edited)
1,268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. -- GUI Test
  2.  
  3. -- DESCRIPTION:
  4. --  Just some code to figure out how computercraft GUI stuff works for my other projects.
  5.  
  6. -- pull.lua
  7. -- shell.run("rm LDrone")
  8. -- shell.run("pastebin get hhv2GEpZ LDrone")
  9.  
  10. local GUI_Builder = {}
  11. GUI_Builder.__index = GUI_Builder
  12.  
  13. function GUI_Builder:new()
  14.     local obj = {}
  15.     setmetatable(obj, GUI_Builder)
  16.  
  17.     self.x_length, self.y_length = term.getSize()
  18.  
  19.     return obj
  20. end
  21.  
  22. function GUI_Builder:test()
  23.     print(self.x_length)
  24.     print(self.y_length)
  25. end
  26.  
  27. local guib = GUI_Builder:new()
  28. guib:test()
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement