From 1f4b5642739f18185b026a5ad95d66680c8b76c9 Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 14 Aug 2016 23:00:13 +0200 Subject: Testing callbacks successfully --- menu.lua | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'menu.lua') diff --git a/menu.lua b/menu.lua index 157fa8e..5b84f83 100644 --- a/menu.lua +++ b/menu.lua @@ -197,11 +197,6 @@ function Menu:startGame() changeScene(world) end --- Controllers stuff -function Menu:assignController(controller) - controller:setParent(self) -end - -- Controller callbacks function Menu:controlpressed(set, action, key) -- assign to character selection @@ -212,14 +207,14 @@ function Menu:controlpressed(set, action, key) end end -- map selection chaos! - if control == "left" then + if action == "left" then if self.map ~= 1 then self.map = self.map - 1 else self.map = #self.maplist end end - if control == "right" then + if action == "right" then if self.map ~= #self.maplist then self.map = self.map + 1 else -- cgit v1.1