diff options
author | 2023-02-18 06:18:45 +1100 | |
---|---|---|
committer | 2023-02-18 06:18:45 +1100 | |
commit | d4589e0b29d6085072ff635d87c3d95c21813a58 (patch) | |
tree | c0d3283ecdd99bd380fc155f4e09b7f4bd573116 /plugins/inputmacro/inputmacro_menu.lua | |
parent | 20d7135179ffe9959f4bfb759a0e5735b7aaaf15 (diff) |
Input refactoring:
osd/modules/input, emu/inpttype.cpp: Made most default joystick
assignments supplied by input modules. Input modules take available
controls into consideration when generating default assignments.
emu/inpttype.ipp: Added a separate "Back" UI input separate from Cancel.
You may want an easier to hit combination for moving to the previous
menu than for exiting or cancelling input. They both default to Escape.
emu/inpttype.ipp: Added a UI Help control. Currently only used by
analog inputs menu
emu/inpttype.h: Moved I/O port field type enum to its own header and
sorted UI controls so they appear in a more logical order.
ui: Don't use UI Select to restore defaults - people should be getting
used to the UI Clear input by now. UI Select cycles multi-value items
instead.
ui/inputmap.cpp: Don't use immediate cancel to cycle between clearing
and restoring default assignment (use UI Clear instead).
osd: Reduced the number of files needing to include the dreaded emu.h.
Got some implementation out of headers.
Diffstat (limited to 'plugins/inputmacro/inputmacro_menu.lua')
-rw-r--r-- | plugins/inputmacro/inputmacro_menu.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/inputmacro/inputmacro_menu.lua b/plugins/inputmacro/inputmacro_menu.lua index 3ef5aa3f6e7..48fef405d0f 100644 --- a/plugins/inputmacro/inputmacro_menu.lua +++ b/plugins/inputmacro/inputmacro_menu.lua @@ -160,6 +160,8 @@ local function handle_edit_items(index, event) end edit_name_buffer = nil return true + elseif event == 'back' then + return true -- swallow back while editing text elseif event == 'cancel' then edit_name_buffer = nil return true @@ -434,7 +436,7 @@ local function handle_add(index, event) local handled, selection = handle_edit_items(index, event) if handled then return true, selection - elseif event == 'cancel' then + elseif event == 'back' then edit_current_macro = nil edit_menu_active = false edit_items = nil @@ -458,7 +460,7 @@ local function handle_edit(index, event) local handled, selection = handle_edit_items(index, event) if handled then return true, selection - elseif (event == 'cancel') or ((index == edit_item_exit) and (event == 'select')) then + elseif (event == 'back') or ((index == edit_item_exit) and (event == 'select')) then edit_current_macro = nil edit_menu_active = false edit_items = nil |