Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local p = {};
- local gpu = nil;
- p.setGpu = function(newgpu);
- gpu = newgpu;
- end
- p.new = function(x, y, width, height, bg, fg)
- local new = {x = x, y = y, width = witdh, height = height, bg = bg, fg = fg};
- setmetatable(new, {__index = p});
- return new;
- end
- p.drawOutline = function(self)
- -- Top left corner
- gpu.set(self.x, self.y, "┌");
- -- Top right corner
- gpu.set(self.x + (self.width - 1), self.y, "┐");
- end
- print(p);
- return p;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement