FAQs
How to update value in a menu item on runtime?
You can update the value of an ItemInput
in the loop
function by calling menu.getItemAt(
``position``
)->setValue(
"your new value here"
)
Examples:
menu.getItemAt(``your position``)->setValue("your new value here")
menu[``your position``]->setValue("your new value here")
menu[``your position``][``your sub position``].setValue("your new value here")
1.
and 2.
are the same, 3.
will change the value of the item at ``your sub position``
in the submenu at ``your position``
You can also use [menu.getCursorPosition()]
in place of menu.[``your position``]
if your cursor is on your desired menu item.
Index/position starts from 1
Last updated