A few changes redesign for overextened context menu, font changes, theme and colors. Download the release if you want to use.
Added new features:
- Add new Context menu description
- Add new Background convar (ox.cfg)
setr ox:menuBackground false #true forces background on every context menu from ox_lib - Add new Background color option
Example of use:
lib.registerContext({
id = 'test',
title = 'title from menu',
---------------------------------- NEW OPTIONS BELOW
description = 'description from menu', --new line description on menu
background = true, --TOGGLE background for only this menu (you can change default to setr ox:menuBackground true)
backgroundColor = '#ffffff', --change the background color
[...]
}) Changes only on: //resource/interface/client/context.lua
data = {
title = data.title,
description = data.description, --murai
background = data.background or GetConvarInt('ox:menuBackground', 0) == 1, --murai
backgroundColor = data.backgroundColor, --murai
canClose = data.canClose,
menu = data.menu,
options = data.options
}A FiveM library and resource implementing reusable modules, methods, and UI elements.
For guidelines to contributing to the project, and to see our Contributor License Agreement, see CONTRIBUTING.md
For additional legal notices, refer to NOTICE.md.
https://github.com/communityox/ox_lib/releases/latest/download/ox_lib.zip
https://www.npmjs.com/package/@communityox/ox_lib
- Install Lua Language Server to ease development with annotations, type checking, diagnostics, and more.
- Install CfxLua IntelliSense to add natives and cfxlua runtime declarations to LLS.
- You can load ox_lib into your global development environment by modifying workspace/user settings "Lua.workspace.library" with the resource path.
- e.g. "c:/fxserver/resources/ox_lib"
