Add function to replace all elements.

This would be nice to have, it would be easier to manage a menu if it's already opened. Here is an example where I would use it.

https://gyazo.com/a5b648502bc15c0c629ce3b86d1759cd
This commit is contained in:
lemonpea
2019-12-23 17:03:28 +01:00
committed by GitHub
parent 3aa7ada482
commit 0439cab26b
+4
View File
@@ -197,6 +197,10 @@ ESX.UI.Menu.Open = function(type, namespace, name, data, submit, cancel, change,
menu.setElement = function(i, key, val)
menu.data.elements[i][key] = val
end
menu.setElements = function(newElements)
menu.data.elements = newElements
end
menu.setTitle = function(val)
menu.data.title = val