Exports
- Added
- Updated
Client side
showTextUI
Shows text with optional display settings.
| Argument | Type |
|---|---|
text | string |
options? | REC_Library.Lib.TextUI.Options |
exports.REC_Library:showTextUI(text, options)
hideTextUI
Hides the text UI.
Takes no arguments.
exports.REC_Library:hideTextUI()
isTextUIOpen
Returns whether text is visible and the displayed text.
Takes no arguments.
Returns: boolean isOpen, string|nil text.
exports.REC_Library:isTextUIOpen()
alertDialog
Opens a confirmation dialog and waits for confirm or cancel.
| Argument | Type |
|---|---|
data | REC_Library.Lib.Alert.Data |
Returns: "confirm" | "cancel".
exports.REC_Library:alertDialog(data)
closeAlertDialog
Closes the active confirmation dialog.
Takes no arguments.
exports.REC_Library:closeAlertDialog()
showGauge
Shows a gauge; the same ID replaces the existing gauge.
| Argument | Type |
|---|---|
data | REC_Library.Lib.Gauge.Data |
Returns: string id.
exports.REC_Library:showGauge(data)
updateGauge
Updates a gauge’s value or display settings. A number is treated as its value.
| Argument | Type |
|---|---|
id | string |
patch | REC_Library.Lib.Gauge.Patch | number a number is taken as the value |
Returns: boolean.
exports.REC_Library:updateGauge(id, patch)
hideGauge
Hides the specified gauge, or all gauges when no ID is supplied.
| Argument | Type |
|---|---|
id? | string |
Returns: boolean.
exports.REC_Library:hideGauge(id)
isGaugeOpen
Checks whether the specified gauge, or any gauge, is visible and returns the visible IDs.
| Argument | Type |
|---|---|
id? | string |
Returns: boolean isOpen, string[] ids.
exports.REC_Library:isGaugeOpen(id)
registerContext
Registers one or more context menus.
| Argument | Type |
|---|---|
context | REC_Library.Lib.Context.Menu | REC_Library.Lib.Context.Menu[] |
exports.REC_Library:registerContext(context)
showContext
Opens a registered context menu by ID.
| Argument | Type |
|---|---|
id | string |
exports.REC_Library:showContext(id)
hideContext
Closes the context menu; onExit controls whether its exit callback runs.
| Argument | Type |
|---|---|
onExit? | boolean run the menu's onExit |
exports.REC_Library:hideContext(onExit)
getOpenContextMenu
Returns the open context menu ID, or nil.
Takes no arguments.
Returns: string|nil.
exports.REC_Library:getOpenContextMenu()
inputDialog
Opens an input form and waits for submitted values; cancellation returns nil.
| Argument | Type |
|---|---|
heading | string |
rows | (string | REC_Library.Lib.Input.Row)[] |
options? | REC_Library.Lib.Input.Options |
Returns: any[]|nil.
exports.REC_Library:inputDialog(heading, rows, options)
closeInputDialog
Closes the input dialog.
Takes no arguments.
exports.REC_Library:closeInputDialog()
progressBar
Displays a progress bar and waits; returns whether it completed.
| Argument | Type |
|---|---|
data | REC_Library.Lib.Progress.Data |
Returns: boolean.
exports.REC_Library:progressBar(data)
progressCircle
Displays circular progress and waits; returns whether it completed.
| Argument | Type |
|---|---|
data | REC_Library.Lib.Progress.Data |
Returns: boolean.
exports.REC_Library:progressCircle(data)
progressActive
Checks whether progress is active.
Takes no arguments.
Returns: boolean.
exports.REC_Library:progressActive()
cancelProgress
Cancels active progress.
Takes no arguments.
exports.REC_Library:cancelProgress()
getTheme
Returns the configured NUI theme.
Takes no arguments.
Returns: REC_Library.Client.UI.Nui.Theme.
exports.REC_Library:getTheme()
setClipboard
Copies text to the clipboard through NUI.
| Argument | Type |
|---|---|
text | string |
exports.REC_Library:setClipboard(text)
showSubtitle
Shows a subtitle, replacing the current subtitle.
| Argument | Type |
|---|---|
data | REC_Library.Lib.Subtitle.Data |
Returns: string|nil id.
exports.REC_Library:showSubtitle(data)
hideSubtitle
Hides the subtitle. An ID restricts dismissal to that subtitle.
| Argument | Type |
|---|---|
id? | string |
Returns: boolean.
exports.REC_Library:hideSubtitle(id)
isSubtitleOpen
Returns subtitle visibility and its ID.
Takes no arguments.
Returns: boolean isOpen, string|nil id.
exports.REC_Library:isSubtitleOpen()
showHelpText
Shows a control hint, replacing the current hint.
| Argument | Type |
|---|---|
data | REC_Library.Lib.HelpText.Data |
Returns: string|nil id.
exports.REC_Library:showHelpText(data)
hideHelpText
Hides the control hint. An ID restricts dismissal to that hint.
| Argument | Type |
|---|---|
id? | string |
Returns: boolean.
exports.REC_Library:hideHelpText(id)
isHelpTextOpen
Returns control-hint visibility and its ID.
Takes no arguments.
Returns: boolean isOpen, string|nil id.
exports.REC_Library:isHelpTextOpen()
registerMenu
Register or replace a menu configuration/builder.
| Arguments | Returns |
|---|---|
config: REC_Library.Client.Class.UI.MenuConfigBuilder | boolean |
showMenu
Open a menu registered by this resource.
| Arguments | Returns |
|---|---|
id: string | boolean |
hideMenu
Close this resource’s active menu.
| Arguments | Returns |
|---|---|
| — | boolean |
getOpenMenu
Return this resource’s active menu ID.
| Arguments | Returns |
|---|---|
| — | string|nil |
unregisterMenu
Remove a menu, closing it if active.
| Arguments | Returns |
|---|---|
id: string | boolean |
getMenuValue
Return an item’s current value.
| Arguments | Returns |
|---|---|
id: string, itemId: string | boolean|number|string|nil |
updateMenuItem
Patch an item. Its ID cannot change.
| Arguments | Returns |
|---|---|
id: string, itemId: string, patch: table | boolean |
