80 lines
1.2 KiB
Lua
80 lines
1.2 KiB
Lua
local classic = require "lib.classic.classic"
|
|
---@class lappy.world : lib.classic.class
|
|
local wrapper = classic:extend()
|
|
|
|
function wrapper:new(path, name)
|
|
self.path = path
|
|
self.name = name
|
|
end
|
|
|
|
function wrapper:load(_args)
|
|
end
|
|
|
|
function wrapper:draw()
|
|
end
|
|
|
|
function wrapper:update(dt)
|
|
end
|
|
|
|
-- mouse
|
|
|
|
function wrapper:mousemoved( x, y, dx, dy, istouch)
|
|
end
|
|
|
|
function wrapper:mousepressed(x, y, button, istouch, presses)
|
|
end
|
|
|
|
function wrapper:mousereleased(x, y, button, istouch, presses)
|
|
end
|
|
|
|
function wrapper:wheelmoved(x, y)
|
|
end
|
|
|
|
-- keyboard
|
|
|
|
function wrapper:keypressed(key, scancode, isrepeat)
|
|
end
|
|
|
|
function wrapper:keyreleased(key, scancode)
|
|
end
|
|
|
|
-- touchscreen
|
|
|
|
function wrapper:touchpressed(id, x, y, dx, dy, pressure)
|
|
end
|
|
|
|
function wrapper:textinput(t)
|
|
end
|
|
|
|
function wrapper:resize(w,h)
|
|
end
|
|
|
|
function wrapper:focus(f)
|
|
end
|
|
|
|
function wrapper:quit()
|
|
end
|
|
|
|
-- for gamepad support also add the following:
|
|
|
|
function wrapper:joystickadded(joystick)
|
|
end
|
|
|
|
function wrapper:joystickremoved(joystick)
|
|
end
|
|
|
|
function wrapper:gamepadpressed(joystick, button)
|
|
end
|
|
|
|
function wrapper:gamepadreleased(joystick, button)
|
|
end
|
|
|
|
function wrapper:gamepadaxis(joystick, axis, value)
|
|
end
|
|
|
|
function wrapper:__tostring()
|
|
return string.format("%s.%s", self.path, self.name)
|
|
end
|
|
|
|
return wrapper
|