chore: various fix-ups from docs clean-up (#363)

- Add in missing js functions
  - getCurrentRadialId
  - requestScaleformMove
- Change up math.tohex to maintain lowercase `0x` prefix
- Add missing fields
- Removed extra whitespaces

Co-authored-by: Luke <39926192+LukeWasTakenn@users.noreply.github.com>
This commit is contained in:
Jag
2023-07-21 04:54:29 -07:00
committed by GitHub
parent 1b8e1f022a
commit 65a799071a
9 changed files with 24 additions and 16 deletions

View File

@@ -6,6 +6,8 @@ local openContextMenu = nil
---@field menu? string
---@field icon? string | {[1]: IconProp, [2]: string};
---@field iconColor? string
---@field image? string
---@field progress? number
---@field onSelect? fun(args: any)
---@field arrow? boolean
---@field description? string

View File

@@ -8,9 +8,12 @@ local openMenu
---@class MenuOptions
---@field label string
---@field progress? number
---@field colorScheme? string
---@field icon? string | {[1]: IconProp, [2]: string};
---@field checked? boolean
---@field iconColor? string
---@field values? table<string | { label: string, description: string }>
---@field checked? boolean
---@field description? string
---@field defaultIndex? number
---@field args? {[any]: any}

View File

@@ -1,5 +1,5 @@
---@alias NotificationPosition 'top' | 'top-right' | 'top-left' | 'bottom' | 'bottom-right' | 'bottom-left' | 'center-right' | 'center-left'
---@alias NotificationType 'info' | 'warning' | 'success' | 'error'
---@alias NotificationType 'inform' | 'warning' | 'success' | 'error'
---@class NotifyProps
---@field id? string
@@ -30,11 +30,11 @@ end
---@param data DefaultNotifyProps
function lib.defaultNotify(data)
-- Backwards compat for v3
-- Backwards compat for v3
data.type = data.status
if data.type == 'inform' then data.type = 'info' end
return lib.notify(data)
end
RegisterNetEvent('ox_lib:notify', lib.notify)
RegisterNetEvent('ox_lib:defaultNotify', lib.defaultNotify)
RegisterNetEvent('ox_lib:defaultNotify', lib.defaultNotify)