ScreenEvent.lua 417 B

123456789101112131415161718192021222324252627
  1. require "Polycode/Event"
  2. class "ScreenEvent" (Event)
  3. ENTITY_MOVE_TOP = 0
  4. ENTITY_MOVE_BOTTOM = 1
  5. ENTITY_MOVE_UP = 2
  6. ENTITY_MOVE_DOWN = 3
  7. function ScreenEvent:ScreenEvent(...)
  8. for k,v in pairs(arg) do
  9. if type(v) == "table" then
  10. if v.__ptr ~= nil then
  11. arg[k] = v.__ptr
  12. end
  13. end
  14. end
  15. if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
  16. self.__ptr = Polycore.ScreenEvent(unpack(arg))
  17. end
  18. end