User Tools

Site Tools



shortcutmanager

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
shortcutmanager [2017/03/23 15:23] fxfireshortcutmanager [2017/03/23 15:35] (current) fxfire
Line 14: Line 14:
 **User Functions:** Create LUA code, which can then be executed by a Button or Key-shortcut. **User Functions:** Create LUA code, which can then be executed by a Button or Key-shortcut.
  
 +\\ 
 +You can also add your own functions by 'code' to the shortcut manager: 
 +<code lua > 
 +ml_input_mgr.registerFunction({ 
 + name = "userVisableName" 
 + func = "theFunction" -- theFunction(boolean state), gets called with a boolean state(true/false) argument. 
 + toggle = true -- OPTIONAL: default to true if "toggle" AND "trigger" are both nil/false, if "trigger" is true and "toggle" is nil/false it defaults to false. Can this function be toggled boolean. press>release>ON>press>release>OFF 
 + trigger = false -- OPTIONAL: default to false. Can this function be triggered. press>ON>release>OFF 
 + icon = path/to/icon.png -- OPTIONAL: supply a default(exclusive) icon for this function. This icon will be used for the "onscreen" button. (this icon cant be chosen by other functions) 
 +}) 
 +</code>
shortcutmanager.1490282604.txt.gz · Last modified: 2017/03/23 15:23 by fxfire