Module Hotkey

Druid hotkey component

Example Link

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:

  • self Hotkey Hotkey
  • keys string[] or string The keys to be pressed for trigger callback. Should contains one key and any modificator keys
  • callback function The callback function
  • callback_argument any or nil The argument to pass into the callback function
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
click_node
Button trigger node
  • click_node node or nil
node
Visual node
on_hotkey_pressed
On hotkey released callback(self, argument)
on_hotkey_released
On hotkey released callback(self, argument)
generated by LDoc TESTING Last updated 2015-01-01 12:00:00