Orbit Studios Resourcesorbit-dynamichud-v2Interface APIs
Text UI
Show persistent DynamicHUD interaction prompts and replace ox_lib Text UI calls.
Text UI
Text UI displays a persistent interaction prompt. Show it once when an interaction becomes available and hide it when the player leaves. Do not call showTextUI every frame.
exports['orbit-dynamichud-v2']:showTextUI('[E] Open garage', {
position = 'right-center',
icon = 'fas fa-warehouse',
iconColor = '#71B6F7'
})
-- When the interaction is no longer available:
exports['orbit-dynamichud-v2']:hideTextUI()The event form is useful from bridge resources:
TriggerEvent('orbit-dynamichud:showTextUI', '{key:E} Open garage', {
position = 'left-center'
})
TriggerEvent('orbit-dynamichud:hideTextUI')A server script can target one player with the same events:
TriggerClientEvent('orbit-dynamichud:showTextUI', source, '[E] Continue')
TriggerClientEvent('orbit-dynamichud:hideTextUI', source)Options
| Option | Type | Default | Description |
|---|---|---|---|
position | string? | "right-center" | right-center, left-center, top-center, or bottom-center. |
icon | `string | string[]?` | none |
iconColor | string? | white | CSS icon color. |
iconAnimation | string? | none | spin, spinPulse, spinReverse, pulse, beat, fade, beatFade, bounce, or shake. |
alignIcon | string? | "center" | center or top. |
style | table? | none | Sanitized CSS overrides. Camel-case names are accepted; numeric dimensions become pixels. |
Use [E] or {key:E} to render a key marker. Newlines create multiple lines.
exports['orbit-dynamichud-v2']:showTextUI('{key:E} Search\nPolice may be alerted', {
position = 'bottom-center',
icon = { 'fas', 'fa-magnifying-glass' },
iconAnimation = 'pulse',
alignIcon = 'top',
style = {
maxWidth = '28vh',
opacity = 0.95
}
})Query its state and current text:
local isOpen, currentText = exports['orbit-dynamichud-v2']:isTextUIOpen()ox_lib drop-in replacement
lib = lib or {}
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()
endThis preserves the ox_lib signatures and both return values from lib.isTextUIOpen(). Existing calls require no edits.
Showing new text replaces the active prompt. Explicitly call hideTextUI during interaction cleanup and resource stop.