Orbit StudiosOrbit Studios
Orbit Studios Resourcesorbit-dynamichud-v2Interface APIs

Interface APIs

Use DynamicHUD 2.0 interfaces directly or migrate ox_lib, ESX, QB-Core, and QBX calls.

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.

ESX, QB-Core, and QBX have different notification and progress contracts. Use their dedicated guides below for call-site mappings and callback handling; do not treat a per-resource bridge as a global framework replacement.

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 2.0 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 2.0 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 2.0 has one progress presentation. This keeps progressCircle call sites
-- functional while rendering the DynamicHUD 2.0 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 and before the scripts that call these interfaces. Add it to your resource's existing client script list; keep all existing entries in their original order:

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

client_scripts {
    'client/orbit_ui_bridge.lua',
    'client/main.lua', -- Example: keep your existing client scripts here.
}

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

If an existing wildcard also matches orbit_ui_bridge.lua, exclude the bridge from that wildcard or list scripts explicitly so the bridge loads only once.

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 2.0, or another resource's Lua environment. DynamicHUD 2.0 keeps the compatible function signatures and return values, while visual-only ox_lib options that have no DynamicHUD 2.0 equivalent use DynamicHUD 2.0'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 2.0 NUI callbacks directly. The Lua interfaces own focus, timeouts, control blocking, animations, props, cleanup, and result validation.

On this page