| 227 | | There are many commands to control the robot, and not enough physical buttons/axis on a gamepad. So, a solution is to multiplex these buttons/axis. There are 2 ways to do that: ''configurations'' and ''modifiers''. ''Configurations'' allow us to change the entire mapping; ''modifiers'' only changes a button meaning. |
| 228 | | |
| 229 | | To create several ''configurations'', use the {{{_addConfig()}}} method. This method take a string as argument, the name of the config. |
| | 227 | There are many commands to control the robot, and not enough physical buttons/axis on a gamepad. So, a solution is to multiplex these buttons/axis. There are 2 ways to do that: ''configurations'' and ''modifiers''. ''Configurations'' allows to change the entire mapping; ''modifiers'' only changes a button meaning. |
| | 228 | |
| | 229 | To create ''configurations'', use the {{{_addConfig()}}} method. This method take a string as argument, the name of the ''configuration''. It is then possible to restrict a {{{Component}}} to a specific ''configuration'' by giving its name in the '''configs''' param (it is possible to give a list/tuple for several ''configurations''). Without it, the {{{Component}}} is active in all ''configurations''. |
| | 230 | |
| | 231 | A ''modifier'' works as Shift, Ctrl or Alt keys on a keyboard, i.e. the {{{Component}}} will only react if the ''modifier'' is press. A ''modifier'' can only be a button_xxx key. |