ox_lib
Drop-in overrides that route lib.notify and lib.progressBar / lib.progressCircle calls to the Bablo HUD. Any resource that already uses ox_lib will automatically use the HUD's UI without modification.
These edits are made inside the ox_lib resource. If you update ox_lib,
you'll need to reapply them — keep a copy of the snippets below or move them
into a small companion resource that overrides lib.notify after ox_lib
has loaded.
Notifications
Replace the body of lib.notify in ox_lib/resource/interface/client/notify.lua:
---@param data NotifyProps
---@diagnostic disable-next-line: duplicate-set-field
function lib.notify(data)
if not data then return end
local notifyType = data.type or 'info'
-- ox_lib uses 'inform', bablo-hud uses 'info'
if notifyType == 'inform' then notifyType = 'info' end
exports['bablo-hud']:Notify(
data.title or '',
data.description or '',
notifyType,
data.duration or 5000
)
endThat's the only change needed for notifications. lib.defaultNotify and the ox_lib:notify net event both call lib.notify internally, so they pick up the override automatically.
Progress Bar
Replace the SendNUIMessage call inside lib.progressBar in ox_lib/resource/interface/client/progress.lua. This keeps all the anim / prop / interruption logic intact and only swaps the visual:
---@param data ProgressProps
---@return boolean?
function lib.progressBar(data)
while progress ~= nil do Wait(0) end
if not interruptProgress(data) then
exports['bablo-hud']:ProgressBar({
duration = data.duration,
label = data.label,
canCancel = data.canCancel,
disable = data.disable,
anim = data.anim,
prop = data.prop,
})
return startProgress(data)
end
endDo the same for lib.progressCircle if you also want the circle variant routed through the HUD:
---@param data ProgressProps
---@return boolean?
function lib.progressCircle(data)
while progress ~= nil do Wait(0) end
if not interruptProgress(data) then
exports['bablo-hud']:ProgressBar({
duration = data.duration,
label = data.label,
canCancel = data.canCancel,
disable = data.disable,
anim = data.anim,
prop = data.prop,
})
return startProgress(data)
end
endAnd hook lib.cancelProgress so cancelling also stops the HUD's bar:
function lib.cancelProgress()
if not progress then
error('No progress bar is active')
end
exports['bablo-hud']:StopProgressBar()
progress = false
endRestart ox_lib (and any resource that streams @ox_lib/init.lua) after
editing these files. A full server restart is the safest option.