mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-17 01:48:33 +00:00
feat(menu): lib.hideMenu
This commit is contained in:
1 parent
cf2c45687a
commit
32a698c043
2 files changed
+12
-2
No files matched your search
@@ -24,6 +24,14 @@ function lib.showMenu(id)
|
||||
})
|
||||
end
|
||||
|
||||
function lib.hideMenu(onExit)
|
||||
if onExit and registeredMenus[openMenu].onClose then registeredMenus[openMenu].onClose() end
|
||||
SetNuiFocus(false, false)
|
||||
SendNUIMessage({
|
||||
action = 'closeMenu'
|
||||
})
|
||||
end
|
||||
|
||||
function lib.setMenuOptions(id, options, index)
|
||||
if index then
|
||||
registeredMenus[id].options[index] = options
|
||||
|
||||
Reference in new issue
Block a user