Orbit StudiosOrbit Studios
Orbit Studios Resourcesorbit-dynamichud-v2Interface APIs

Interface APIs

Use DynamicHUD notifications, Text UI, skill checks, and progress bars directly or as ox_lib replacements.

Interface APIs

Orbit Dynamic HUD 2.0 exposes four reusable client interfaces. The APIs intentionally match the common ox_lib method signatures, so a small compatibility bridge can keep existing call sites unchanged.

The bridge signatures follow the official ox_lib references for notifications, Text UI, skill checks, and progress.

Resource name

These examples require the folder name orbit-dynamichud-v2. Renaming an escrowed resource can break exports and is not supported.

Direct exports

Call exports from client scripts:

resources/[custom]/client/main.lua
exports['orbit-dynamichud-v2']:notify({
    description = 'Vehicle stored successfully.',
    type = 'success'
})

local completed = exports['orbit-dynamichud-v2']:progressBar({
    label = 'Storing vehicle',
    duration = 2500,
    canCancel = true
})
DynamicHUD exportCompatible ox_lib call
notify(data)lib.notify(data)
showTextUI(text, options)lib.showTextUI(text, options)
hideTextUI()lib.hideTextUI()
isTextUIOpen()lib.isTextUIOpen()
skillCheck(difficulty, inputs)lib.skillCheck(difficulty, inputs)
skillCheckActive()lib.skillCheckActive()
cancelSkillCheck()lib.cancelSkillCheck()
progressBar(data)lib.progressBar(data)
progressActive()lib.progressActive()
cancelProgress()lib.cancelProgress()

Complete ox_lib compatibility bridge

Create this client file in each resource whose interface calls you want DynamicHUD to handle. Existing calls such as lib.notify(...), lib.showTextUI(...), lib.skillCheck(...), and lib.progressBar(...) then continue working without edits.

resources/[custom]/client/orbit_ui_bridge.lua
lib = lib or {}

lib.notify = function(data)
    return exports['orbit-dynamichud-v2']:notify(data)
end

lib.showTextUI = function(text, options)
    return exports['orbit-dynamichud-v2']:showTextUI(text, options)
end

lib.hideTextUI = function()
    return exports['orbit-dynamichud-v2']:hideTextUI()
end

lib.isTextUIOpen = function()
    return exports['orbit-dynamichud-v2']:isTextUIOpen()
end

lib.skillCheck = function(difficulty, inputs)
    return exports['orbit-dynamichud-v2']:skillCheck(difficulty, inputs)
end

lib.skillCheckActive = function()
    return exports['orbit-dynamichud-v2']:skillCheckActive()
end

lib.cancelSkillCheck = function()
    return exports['orbit-dynamichud-v2']:cancelSkillCheck()
end

lib.progressBar = function(data)
    return exports['orbit-dynamichud-v2']:progressBar(data)
end

-- DynamicHUD has one progress presentation. This keeps progressCircle call sites
-- functional while rendering the DynamicHUD progress bar.
lib.progressCircle = lib.progressBar

lib.progressActive = function()
    return exports['orbit-dynamichud-v2']:progressActive()
end

lib.cancelProgress = function()
    return exports['orbit-dynamichud-v2']:cancelProgress()
end

Load the bridge after @ox_lib/init.lua when that resource still uses other ox_lib modules:

resources/[custom]/fxmanifest.lua
shared_script '@ox_lib/init.lua'

client_scripts {
    'client/orbit_ui_bridge.lua',
    'client/**/*.lua'
}

dependencies {
    'ox_lib',
    'orbit-dynamichud-v2'
}

If the resource uses no other ox_lib API, remove its @ox_lib/init.lua line and the ox_lib dependency, but keep orbit_ui_bridge.lua first in client_scripts. The bridge creates lib when necessary. Do not remove ox_lib from a resource that still calls callbacks, zones, menus, points, locales, or any other lib.* method.

Scope of the bridge

The bridge changes interface calls only inside the resource that loads it. It does not modify ox_lib, DynamicHUD, or another resource's Lua environment. DynamicHUD keeps the compatible function signatures and return values, while visual-only ox_lib options that have no DynamicHUD equivalent use DynamicHUD's own presentation.

Cleanup

When your resource owns a persistent or blocking interface, clean it up during resource stop:

resources/[custom]/client/main.lua
AddEventHandler('onClientResourceStop', function(resourceName)
    if resourceName ~= GetCurrentResourceName() then return end

    exports['orbit-dynamichud-v2']:hideTextUI()
    exports['orbit-dynamichud-v2']:cancelSkillCheck()
    exports['orbit-dynamichud-v2']:cancelProgress()
end)

Never call DynamicHUD NUI callbacks directly. The Lua interfaces own focus, timeouts, control blocking, animations, props, cleanup, and result validation.

On this page