From 0439cab26b34f1bbb514108f7c68df380f126a02 Mon Sep 17 00:00:00 2001 From: lemonpea <59174721+lemonpea@users.noreply.github.com> Date: Mon, 23 Dec 2019 17:03:28 +0100 Subject: [PATCH] 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 --- client/functions.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/functions.lua b/client/functions.lua index 95b89359..d3b68d36 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -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