mirror of
https://github.com/notwa/mm
synced 2025-02-05 13:23:23 -08:00
make L close menu in greedy mode
This commit is contained in:
parent
b169d1d11e
commit
3f7e7a1a0d
2 changed files with 8 additions and 6 deletions
|
@ -21,10 +21,10 @@ alternate: (alt_input = true; eat_input = false)
|
||||||
L+Z hides the menu without closing (FIXME: interferes with back button)
|
L+Z hides the menu without closing (FIXME: interferes with back button)
|
||||||
D-Pad navigates
|
D-Pad navigates
|
||||||
greedy: (alt_input = false; eat_input = true)
|
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
|
while the menu is open, the game receives no inputs
|
||||||
D-Pad/Joystick/C-Buttons navigate through items and pages
|
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)
|
B/R go back a menu (or closes)
|
||||||
Z hides the menu without closing
|
Z hides the menu without closing
|
||||||
TODO: joystick, a/b button etc
|
TODO: joystick, a/b button etc
|
||||||
|
|
|
@ -35,15 +35,17 @@ function handle_eat_input(handle, ctrl, pressed)
|
||||||
if not handle.menu then
|
if not handle.menu then
|
||||||
pressed.enter = pressed.L
|
pressed.enter = pressed.L
|
||||||
else
|
else
|
||||||
if pressed.Z then
|
if pressed.L then
|
||||||
|
handle:navigate('close')
|
||||||
|
elseif pressed.Z then
|
||||||
handle:navigate('hide')
|
handle:navigate('hide')
|
||||||
elseif pressed.R or pressed.B then
|
elseif pressed.R or pressed.B then
|
||||||
handle:navigate('back')
|
handle:navigate('back')
|
||||||
|
else
|
||||||
|
pressed.enter = pressed.A or pressed.L
|
||||||
|
ctrl.enter = ctrl.A
|
||||||
end
|
end
|
||||||
|
|
||||||
pressed.enter = pressed.A or pressed.L
|
|
||||||
ctrl.enter = ctrl.A or ctrl.L
|
|
||||||
|
|
||||||
joypad.set({}, 1)
|
joypad.set({}, 1)
|
||||||
joypad.setanalog({["X Axis"]=false, ["Y Axis"]=false}, 1)
|
joypad.setanalog({["X Axis"]=false, ["Y Axis"]=false}, 1)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue