GenZeeDocs
Switching from…

Switching from ox_lib

Keep your ox_lib scripts as they are and let them render through Universal UI.

You don't need to rewrite anything. Install Universal UI, ensure universal_bridge after ox_lib, and every ox_lib interface call renders through Universal UI.

Keep ox_lib installed on Qbox

Qbox needs ox_lib for callbacks, zones and locales, so leave it running. The bridge only takes over its interface calls. On servers that only had ox_lib for its UI, you can stop it whenever you like.

What's covered

Each ox_lib function below behaves the same from the calling script's point of view. When you write new code, you can call the Universal UI export directly.

ox_libUniversal UI export
lib.notifynotify
lib.registerContext, lib.showContext, lib.hideContext, lib.getOpenContextMenuregisterContext, showContext, hideContext, getOpenContextMenu
lib.inputDialog, lib.closeInputDialoginputDialog, closeInputDialog
lib.alertDialog, lib.closeAlertDialogalertDialog, closeAlertDialog
lib.progressBar, lib.progressCircle, lib.progressActive, lib.cancelProgressprogressBar, progressCircle, progressActive, cancelProgress
lib.skillCheck, lib.skillCheckActive, lib.cancelSkillCheckskillCheck, skillCheckActive, cancelSkillCheck
lib.showTextUI, lib.hideTextUI, lib.isTextUIOpenshowTextUI, hideTextUI, isTextUIOpen
lib.registerMenu, lib.showMenu, lib.hideMenu, lib.getOpenMenu, lib.setMenuOptionsregisterMenu, showMenu, hideMenu, getOpenMenu, setMenuOptions
lib.setClipboardsetClipboard
lib.addRadialItem and the rest of the radial APIUniversal Targeting's radial exports

Non-interface parts of ox_lib, such as callbacks, cache, points and zones, are left alone.

Also covered

  • ps-ui minigames. exports['ps-ui']:Circle and Scrambler have matching exports on universal_ui, so swap the resource name and keep your call sites.
  • Framework notifications. QBCore and ESX notifications render through Universal UI as well. See Frameworks.

Check it

With setr universal_ui:dev 1 in server.cfg, run /universal_bridge:test in game. It makes real lib.* calls, so if they look like Universal UI, you're done. Set the convar back to 0 afterwards.

If a notification still looks like ox_lib, see the one thing the bridge can't redirect.

On this page