Module cl_controls

Controls Module

Functions

ControlsRegister (key, label, onPressed, onReleased, onHeld) ControlsRegister function.
ControlsDisable (key, toggle) ControlsDisable function.
ControlsDisableAll (toggle) ControlsDisableAll function.


Functions

ControlsRegister (key, label, onPressed, onReleased, onHeld)
ControlsRegister function. This function registers a control.

Parameters:

  • key The key. string
  • label The label. string
  • onPressed The onPressed function. function
  • onReleased The onReleased function. function
  • onHeld The onHeld function. function

Usage:

    exports.sd_util:ControlsRegister("key", "label", function() print("Pressed") end, function() print("Released") end, function() print("Held") end)
ControlsDisable (key, toggle)
ControlsDisable function. This function disables a control.

Parameters:

  • key The key. string
  • toggle The toggle. boolean

Usage:

    exports.sd_util:ControlsDisable("key", true)
ControlsDisableAll (toggle)
ControlsDisableAll function. This function disables all controls.

Parameters:

  • toggle The toggle. boolean

Usage:

    exports.sd_util:ControlsDisableAll(true)
generated by LDoc 1.5.0 Last updated 2023-11-28 19:34:18