mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +00:00
feat(es_extended/client/functions): annoations
This commit is contained in:
@@ -41,6 +41,10 @@ AddEventHandler("esx_menu_dialog:message:menu_submit", function(data)
|
||||
local menu = ESX.UI.Menu.GetOpened(MenuType, data._namespace, data._name)
|
||||
local cancel = false
|
||||
|
||||
if not menu then
|
||||
return
|
||||
end
|
||||
|
||||
if menu.submit then
|
||||
-- is the submitted data a number?
|
||||
if tonumber(data.value) then
|
||||
@@ -66,6 +70,10 @@ end)
|
||||
AddEventHandler("esx_menu_dialog:message:menu_cancel", function(data)
|
||||
local menu = ESX.UI.Menu.GetOpened(MenuType, data._namespace, data._name)
|
||||
|
||||
if not menu then
|
||||
return
|
||||
end
|
||||
|
||||
if menu.cancel ~= nil then
|
||||
menu.cancel(data, menu)
|
||||
end
|
||||
@@ -74,6 +82,10 @@ end)
|
||||
AddEventHandler("esx_menu_dialog:message:menu_change", function(data)
|
||||
local menu = ESX.UI.Menu.GetOpened(MenuType, data._namespace, data._name)
|
||||
|
||||
if not menu then
|
||||
return
|
||||
end
|
||||
|
||||
if menu.change ~= nil then
|
||||
menu.change(data, menu)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user