mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-18 15:36:02 +01:00
fix(client/context): Ensure is ordered correctly
Previously the menu items would be randomly ordered, now they are the order you wrote them to be in.
This commit is contained in:
@@ -6,14 +6,14 @@ function lib.showContext(id)
|
|||||||
local data = contextMenus[id]
|
local data = contextMenus[id]
|
||||||
openContextMenu = id
|
openContextMenu = id
|
||||||
SetNuiFocus(true, true)
|
SetNuiFocus(true, true)
|
||||||
SendNUIMessage({
|
SendNuiMessage(json.encode({
|
||||||
action = 'showContext',
|
action = 'showContext',
|
||||||
data = {
|
data = {
|
||||||
title = data.title,
|
title = data.title,
|
||||||
menu = data.menu,
|
menu = data.menu,
|
||||||
options = data.options
|
options = data.options
|
||||||
}
|
}
|
||||||
})
|
}, {sort_keys=true}))
|
||||||
end
|
end
|
||||||
|
|
||||||
function lib.registerContext(context)
|
function lib.registerContext(context)
|
||||||
|
|||||||
Reference in New Issue
Block a user