Add possibility to add actions for hotkeys. #51
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
System for binding predefined actions with hotkeys module.
Api for external mods/modules.
Add action to action list:
modules.game_hotkeys.addAction(moduleName, actionName, function)
Remove action from action list:
modules.game_hotkeys.removeAction(moduleName, actionName)
or for all module actions:
modules.game_hotkeys.removeAction(moduleName)
How it's look in game_hotkeys module (new buttons "Add action" / "Clear action", new hotkey type "Action"):
![image](https://user-images.githubusercontent.com/29635365/83562699-4dba2900-a51a-11ea-89c7-255d2f21efc2.png)
List with actions:
![image](https://user-images.githubusercontent.com/29635365/83562741-5f9bcc00-a51a-11ea-9d80-4645ab6cb387.png)
Limitations:
Related with:
edubart#217