Advertisement
Guest User

Untitled

a guest
Aug 24th, 2014
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. local p = {};
  2.  
  3. local gpu = nil;
  4.  
  5. p.setGpu = function(newgpu);
  6. gpu = newgpu;
  7. end
  8.  
  9. p.new = function(x, y, width, height, bg, fg)
  10. local new = {x = x, y = y, width = witdh, height = height, bg = bg, fg = fg};
  11. setmetatable(new, {__index = p});
  12. return new;
  13. end
  14.  
  15. p.drawOutline = function(self)
  16. -- Top left corner
  17. gpu.set(self.x, self.y, "┌");
  18.  
  19. -- Top right corner
  20. gpu.set(self.x + (self.width - 1), self.y, "┐");
  21. end
  22.  
  23. print(p);
  24.  
  25. return p;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement