From 3f7e7a1a0d7e5f7fd9fc2d4454b99fe79e19c680 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Sat, 14 Nov 2015 16:42:50 -0800 Subject: [PATCH] make L close menu in greedy mode --- Lua/cheat menu.lua | 4 ++-- Lua/menu input handlers.lua | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Lua/cheat menu.lua b/Lua/cheat menu.lua index 3bd618f..61b5e9a 100755 --- a/Lua/cheat menu.lua +++ b/Lua/cheat menu.lua @@ -21,10 +21,10 @@ alternate: (alt_input = true; eat_input = false) L+Z hides the menu without closing (FIXME: interferes with back button) D-Pad navigates greedy: (alt_input = false; eat_input = true) - L opens the menu + L opens/closes the menu while the menu is open, the game receives no inputs D-Pad/Joystick/C-Buttons navigate through items and pages - A/L select menu items + A select menu items B/R go back a menu (or closes) Z hides the menu without closing TODO: joystick, a/b button etc diff --git a/Lua/menu input handlers.lua b/Lua/menu input handlers.lua index 09310fc..ac86626 100644 --- a/Lua/menu input handlers.lua +++ b/Lua/menu input handlers.lua @@ -35,15 +35,17 @@ function handle_eat_input(handle, ctrl, pressed) if not handle.menu then pressed.enter = pressed.L else - if pressed.Z then + if pressed.L then + handle:navigate('close') + elseif pressed.Z then handle:navigate('hide') elseif pressed.R or pressed.B then handle:navigate('back') + else + pressed.enter = pressed.A or pressed.L + ctrl.enter = ctrl.A end - pressed.enter = pressed.A or pressed.L - ctrl.enter = ctrl.A or ctrl.L - joypad.set({}, 1) joypad.setanalog({["X Axis"]=false, ["Y Axis"]=false}, 1) end