Module Hotkey
Druid hotkey component
Functions
add_hotkey(self, keys, callback_argument) | Add hotkey for component callback |
init(self, keys, callback, callback_argument) | The Hotkey constructor |
set_repeat(self, is_enabled_repeated) | If true, the callback will be triggered on action.repeated |
Tables
style | Component style params. |
Fields
button | Button component from click_node |
click_node | Button trigger node |
node | Visual node |
on_hotkey_pressed | On hotkey released callback(self, argument) |
on_hotkey_released | On hotkey released callback(self, argument) |
Functions
- add_hotkey(self, keys, callback_argument)
-
Add hotkey for component callback
Parameters:
- self Hotkey Hotkey
- keys string[], hash[], string or hash that have to be pressed before key pressed to activate
- callback_argument any or nil The argument to pass into the callback function
Returns:
-
Hotkey
Current instance
- init(self, keys, callback, callback_argument)
-
The Hotkey constructor
Parameters:
- set_repeat(self, is_enabled_repeated)
-
If true, the callback will be triggered on action.repeated
Parameters:
- self Hotkey Hotkey
- is_enabled_repeated bool The flag value
Returns:
-
Hotkey
Tables
- style
-
Component style params.
You can override this component styles params in druid styles table
or create your own style
Fields:
- MODIFICATORS string[] The list of action_id as hotkey modificators
Fields
- button
-
Button component from click_node
- button Button Button
- click_node
-
Button trigger node
- click_node node or nil
- node
-
Visual node
- node node
- on_hotkey_pressed
-
On hotkey released callback(self, argument)
- on_hotkey_pressed DruidEvent DruidEvent
- on_hotkey_released
-
On hotkey released callback(self, argument)
- on_hotkey_released DruidEvent DruidEvent