Jump to content

Set Menu Button Text on a Message(option menu) from variable


nexusMods3

Recommended Posts

Is there any way to set up the message's menu buttons texts using a variable? I've already learned how to make an options menu, but the menu options are dynamic. I wanted to do something like this

myMessage.addMenuOption(mystring1)
myMessage.addMenuOption(mystring2)
myMessage.show()

I couldn't find anywhere how to do it. Is it even possible? Thank you.

Link to comment
Share on other sites

No. You can however set up multiple buttons to display under different conditions. One of those conditions could be the value of one or more global variables (GV). Your script then could set the GVs as necessary to display the appropriate buttons.

 

Failing that, I suppose you could design an MCM page that has your dynamic menu.

Link to comment
Share on other sites

Thanks for the reply IsharaMeradin, the problem is I filter certain items from the user inventory and I want to display those items as an options list, because then I would do something with the selected item that was filtered out...wow, I just can't believe that such a simple feature like that is not available for modders...

 

--EDIT--

Isn't there even a way to display a list of options where the user select one and click OK?

Edited by nexusMods3
Link to comment
Share on other sites

The message box menu system is rather simple. Click a button choice and something happens.

 

MCM allows for more complicated menu set ups even the style you are looking for (a list of options where you select one and something is done) but it, alas, requires the user to go into the MCM menu to access it.

Link to comment
Share on other sites

Well I basically show a debug message with the options to the user(a huge string with \n to separate the options lol), and use the RegisterForKey to register the up and down arrows. So the user can select the options by using the up and down arrow(well, he won't have a visual feedback of what he has chosen, but it's not that bad). I created another topic about not being able to use the RegisterForKey function, but I figured that out as well.

Edited by nexusMods3
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...