Skip to content

How to update value in a menu item? #9

Answered by forntoh
dj-fiorex asked this question in Q&A
Discussion options

You must be logged in to vote

You can update the value of an ItemInput in the loop function by calling
menu.getItemAt(``position``)->value = "your new value here"

Examples:

  1. menu.getItemAt(``your position``)->value = "your new value here"
  2. menu[``your position``]->value = "your new value here"
  3. menu[``your position``][``your sub position``].value = "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 the desired menu

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by forntoh
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #9 on December 09, 2020 14:24.