Module cl_ui
UI Wrapper for sd_util
Functions
| UICreateCustom (identifier, addon, htmladd) | UICreateCustom function. |
| UIRegisterCallback (identifier, name, func) | UIRegisterCallback function. |
| UISetFocus (identifier, keyboard, mouse) | UISetFocus function. |
| UIDisableAll () | UIDisableAll function. |
| UIEnableAll () | UIEnableAll function. |
| UIEnable (identifier) | UIEnable function. |
| UIDisable (identifier) | UIDisable function. |
| CopyToClipboard (text) | CopyToClipboard function. |
Functions
- UICreateCustom (identifier, addon, htmladd)
-
UICreateCustom function.
This function creates a custom UI.
Parameters:
- identifier The identifier for the UI. string
- addon The addon name. string
- htmladd The html file name. string
Usage:
exports.sd_util:UICreateCustom("test", "sd_util", "ui/test.html")
- UIRegisterCallback (identifier, name, func)
-
UIRegisterCallback function.
This function registers a callback for a UI.
Parameters:
- identifier The identifier for the UI. string
- name The callback name. string
- func The callback function. function
Usage:
exports.sd_util:UIRegisterCallback("test", "test", function(data, cb)
- UISetFocus (identifier, keyboard, mouse)
-
UISetFocus function.
This function sets the focus for a UI.
Parameters:
- identifier The identifier for the UI. string
- keyboard The keyboard focus. boolean
- mouse The mouse focus. boolean
Usage:
exports.sd_util:UISetFocus("test", true, true)
- UIDisableAll ()
-
UIDisableAll function.
This function disables all UIs.
Usage:
exports.sd_util:UIDisableAll() - UIEnableAll ()
-
UIEnableAll function.
This function enables all UIs.
Usage:
exports.sd_util:UIEnableAll() - UIEnable (identifier)
-
UIEnable function.
This function enables a UI.
Parameters:
- identifier The identifier for the UI. string
Usage:
exports.sd_util:UIEnable("test")
- UIDisable (identifier)
-
UIDisable function.
This function disables a UI.
Parameters:
- identifier The identifier for the UI. string
Usage:
exports.sd_util:UIDisable("test")
- CopyToClipboard (text)
-
CopyToClipboard function.
This function copies a string to the clipboard.
Parameters:
- text The text to copy. string
Usage:
exports.sd_util:CopyToClipboard("test")