(action, current, This)
| 868 | } |
| 869 | |
| 870 | function changeButton(action, current, This) |
| 871 | { |
| 872 | if(recording) return; |
| 873 | |
| 874 | recording = true; |
| 875 | |
| 876 | dom.this(template._contentRight()).find('table tbody td').removeClass('active'); |
| 877 | This.classList.add('active'); |
| 878 | |
| 879 | shortcuts.record(function(shortcut){ |
| 880 | |
| 881 | gamepad.reset('record'); |
| 882 | |
| 883 | This.classList.remove('active'); |
| 884 | |
| 885 | events.snackbar({ |
| 886 | key: 'useGamepad', |
| 887 | text: language.settings.shortcuts.useGamepad, |
| 888 | duration: 6, |
| 889 | update: true, |
| 890 | buttons: [ |
| 891 | { |
| 892 | text: language.buttons.dismiss, |
| 893 | function: 'events.closeSnackbar();', |
| 894 | }, |
| 895 | ], |
| 896 | }); |
| 897 | |
| 898 | setTimeout(function(){recording = false}, 100); |
| 899 | |
| 900 | }); |
| 901 | |
| 902 | gamepad.setButtonEvent('record', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], function(key, button){ |
| 903 | |
| 904 | gamepad.reset('record'); |
| 905 | shortcuts.stopRecord(); |
| 906 | |
| 907 | shortcuts.changeGamepad('reading', action, current, gamepad.buttonName(key)); |
| 908 | |
| 909 | generateShortcutsTable(gamepad.currentHighlightItem()); |
| 910 | |
| 911 | setTimeout(function(){recording = false}, 100); |
| 912 | |
| 913 | }); |
| 914 | } |
| 915 | |
| 916 | function removeButton(action, current) |
| 917 | { |
nothing calls this directly
no test coverage detected