1
0
Fork 0
mirror of https://github.com/notwa/mm synced 2024-11-04 22:49:03 -08:00

make L close menu in greedy mode

This commit is contained in:
Connor Olding 2015-11-14 16:42:50 -08:00
parent b169d1d11e
commit 3f7e7a1a0d
2 changed files with 8 additions and 6 deletions

View file

@ -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

View file

@ -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