User Tools

Site Tools



shortcutmanager

Differences

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

Link to this comparison view

Next revision
Previous revision
shortcutmanager [2017/03/23 15:22] – created fxfireshortcutmanager [2017/03/23 15:35] (current) fxfire
Line 12: Line 12:
 **Key Binds:** Binding Functions to Keyboard Shortcuts.\\ **Key Binds:** Binding Functions to Keyboard Shortcuts.\\
 **Button Bind:** Binding Functions to Image-Buttons.\\ **Button Bind:** Binding Functions to Image-Buttons.\\
-**User Functions:** Create Functions 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.1490282565.txt.gz · Last modified: 2017/03/23 15:22 by fxfire