MouseEventResult.lua 620 B

12345678910111213141516171819202122232425262728
  1. class "MouseEventResult"
  2. function MouseEventResult:__getvar(name)
  3. if name == "hit" then
  4. return Polycore.MouseEventResult_get_hit(self.__ptr)
  5. elseif name == "blocked" then
  6. return Polycore.MouseEventResult_get_blocked(self.__ptr)
  7. end
  8. end
  9. function MouseEventResult:__setvar(name,value)
  10. if name == "hit" then
  11. Polycore.MouseEventResult_set_hit(self.__ptr, value)
  12. return true
  13. elseif name == "blocked" then
  14. Polycore.MouseEventResult_set_blocked(self.__ptr, value)
  15. return true
  16. end
  17. return false
  18. end
  19. function MouseEventResult:__delete()
  20. if self then Polycore.delete_MouseEventResult(self.__ptr) end
  21. end