From 37fa93429a841c78fde4510250bd47bb6da9727e Mon Sep 17 00:00:00 2001 From: Aki Date: Mon, 15 Aug 2016 20:32:15 +0200 Subject: Controller module additional callbacks --- main.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'main.lua') diff --git a/main.lua b/main.lua index 837e156..cb66aa0 100644 --- a/main.lua +++ b/main.lua @@ -55,9 +55,7 @@ function love.load() Font:setLineHeight(9/16) love.graphics.setFont(Font) -- Controller - love.joystick.loadGamepadMappings("gamecontrollerdb.txt") - Controller.registerSet("left", "right", "up", "down", "return", "rshift") - Controller.registerSet("a", "d", "w", "s", "g", "h") + Controller.load() -- Scene Scene = Menu:new() end @@ -78,6 +76,7 @@ function love.draw() end -- Pass input to Controller function love.joystickadded(joystick) Controller.joystickadded(joystick) end +function love.gamepadaxis(joystick, axis, value) Controller.gamepadaxis(joystick, axis, value) end function love.gamepadpressed(joystick, key) Controller.gamepadpressed(joystick, key) end function love.gamepadreleased(joystick, key) Controller.gamepadreleased(joystick, key) end function love.keypressed(key) Controller.keypressed(key) end -- cgit v1.1