Official ScriptUO EasyUO Scripts > Scripting Chat

Menu talk

(1/2) > >>

12TimesOver:
Question perhaps not worthy of an entire thread but nevertheless...

I'm working on a script that will benefit from the use of a multi-menu UI. As one piece of the setup is complete I want to retire the menu. I'm assuming that the "menu hide" command leaves the menu accessible thus in memory, is this correct? Any negative repercussions to using the menu hide then loading other menus?

As always, any input is greatly appreciated!

X

Tidus:
If you menu hide and then load up a new menu using the same % ! values you will then auto change any values, otherwise, yes they are stored in memory for later use.  So that you can use multiple menus and each can ask a different question but the program will still remember a past choice.

TrailMyx:
You just have to be careful with menus when you are thinking that EUO handles more than one at a time.  IT DOESN'T.  It's up to you and how you control the addition and deletion of the menu items.  Just keep in mind you are still talking about only one.  Here's a bit of code that'll demonstrate it:

(notice how you have 2 EUOButton1s now? - when you run showEUOMenu2)  :)


--- Code: ---gosub showEUOMenu1
pause
gosub showEUOMenu2
pause
gosub showEUOMenu1
stop
sub showEUOMenu1
menu Clear
menu Window Title EUOMenu1
menu Window Color BtnFace
menu Window Size 228 138
menu Font Transparent #true
menu Font Align Right
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style
menu Font Color WindowText
menu Button EUOButton1 36 40 75 25 EUOButton1
menu Show 421 270
return

sub showEUOMenu2
menu Window Title EUOMenu2
menu Window Color BtnFace
menu Window Size 228 138
menu Font Transparent #true
menu Font Align Right
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style
menu Font Color WindowText
menu Button EUOButton1 36 96 75 25 EUOButton1
menu Show 421 270
return

--- End code ---

12TimesOver:
So am I understanding correctly that it's an exercise of simply keeping the object names in line correctly?

My example is first I want a small menu to display a simple dropdown list of options, option is chosen, OK is clicked, Menu is hidden, the next menu is called. This next menu would be a setup menu based on which option is chosen in the first menu, setup options selected, OK is clicked, variables saved, menu hidden, tracking menu called. This third menu will stay active.

If I make sure there are no name conflicts does this work?

Tidus:
Yes,  A good example of this would be C2's Play That Funky Music Multi-Trainer. http://winuo.org/multi-trainers/1140-c2s-play-funky-music-multi-trainer.html  You just need to make sure as you said before that nothing is repeated that is vital to the menu.

Navigation

[0] Message Index

[#] Next page

Go to full version