ScreenLine.lua 637 B

1234567891011121314151617181920212223242526272829303132333435
  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. end
  14. end
  15. function ScreenLine:Update()
  16. local retVal = Polycore.ScreenLine_Update(self.__ptr)
  17. end
  18. function ScreenLine:Render()
  19. local retVal = Polycore.ScreenLine_Render(self.__ptr)
  20. end
  21. function ScreenLine:setLineWidth(width)
  22. local retVal = Polycore.ScreenLine_setLineWidth(self.__ptr, width)
  23. end