ScreenLine.lua 680 B

123456789101112131415161718192021222324252627282930313233343536
  1. require "Polycode/ScreenEntity"
  2. class "ScreenLine" (ScreenEntity)
  3. function ScreenLine:ScreenLine(...)
  4. for k,v in pairs(arg) do
  5. if type(v) == "table" then
  6. if v.__ptr ~= nil then
  7. arg[k] = v.__ptr
  8. end
  9. end
  10. end
  11. if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
  12. self.__ptr = Polycore.ScreenLine(unpack(arg))
  13. Polycore.__ptr_lookup[self.__ptr] = self
  14. end
  15. end
  16. function ScreenLine:Update()
  17. local retVal = Polycore.ScreenLine_Update(self.__ptr)
  18. end
  19. function ScreenLine:Render()
  20. local retVal = Polycore.ScreenLine_Render(self.__ptr)
  21. end
  22. function ScreenLine:setLineWidth(width)
  23. local retVal = Polycore.ScreenLine_setLineWidth(self.__ptr, width)
  24. end