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_lib | Universal UI export |
|---|---|
lib.notify | notify |
lib.registerContext, lib.showContext, lib.hideContext, lib.getOpenContextMenu | registerContext, showContext, hideContext, getOpenContextMenu |
lib.inputDialog, lib.closeInputDialog | inputDialog, closeInputDialog |
lib.alertDialog, lib.closeAlertDialog | alertDialog, closeAlertDialog |
lib.progressBar, lib.progressCircle, lib.progressActive, lib.cancelProgress | progressBar, progressCircle, progressActive, cancelProgress |
lib.skillCheck, lib.skillCheckActive, lib.cancelSkillCheck | skillCheck, skillCheckActive, cancelSkillCheck |
lib.showTextUI, lib.hideTextUI, lib.isTextUIOpen | showTextUI, hideTextUI, isTextUIOpen |
lib.registerMenu, lib.showMenu, lib.hideMenu, lib.getOpenMenu, lib.setMenuOptions | registerMenu, showMenu, hideMenu, getOpenMenu, setMenuOptions |
lib.setClipboard | setClipboard |
lib.addRadialItem and the rest of the radial API | Universal 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']:CircleandScramblerhave matching exports onuniversal_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.
