Author Topic: Menu talk  (Read 3350 times)

0 Members and 1 Guest are viewing this topic.

Offline 12TimesOverTopic starter

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Menu talk
« on: January 19, 2009, 02:50:12 PM »
0
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
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline Tidus

  • Lazy
  • Administrator
  • *
  • *
  • Posts: 1291
  • Activity:
    0%
  • Reputation Power: 15
  • Tidus is working their way up.Tidus is working their way up.Tidus is working their way up.
  • Gender: Male
  • Mind Blown
  • Respect: +151
  • Referrals: 2
    • View Profile
    • Ultimate Apparel
Re: Menu talk
« Reply #1 on: January 20, 2009, 08:41:23 AM »
0
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.
For those who have fought for it, freedom has a taste the protected will never know ~ Anonymous, Vietnam, 1968

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Menu talk
« Reply #2 on: January 20, 2009, 08:52:47 AM »
0
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: [Select]
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
« Last Edit: January 20, 2009, 09:01:20 AM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline 12TimesOverTopic starter

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Re: Menu talk
« Reply #3 on: January 20, 2009, 09:01:27 AM »
0
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?

When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline Tidus

  • Lazy
  • Administrator
  • *
  • *
  • Posts: 1291
  • Activity:
    0%
  • Reputation Power: 15
  • Tidus is working their way up.Tidus is working their way up.Tidus is working their way up.
  • Gender: Male
  • Mind Blown
  • Respect: +151
  • Referrals: 2
    • View Profile
    • Ultimate Apparel
Re: Menu talk
« Reply #4 on: January 20, 2009, 09:05:29 AM »
0
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.
For those who have fought for it, freedom has a taste the protected will never know ~ Anonymous, Vietnam, 1968

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Menu talk
« Reply #5 on: January 20, 2009, 09:10:17 AM »
0
Whenever I've done multiple menus, you just make it so they clear and redraw themselves completely.  To be honest, it doesn't make much difference as long as the supporting code knows what menu you are on.  It's embarrassing when you are assuming you are on your configuration menu, but your code has already graduated to the system menu.  I always put a variable in the menu drawing sub to keep the script up to date with what's displayed.

I actually started a menu drawing framework (actually started with my list management subs) that manages your menus.  I never finished that. 
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline 12TimesOverTopic starter

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Re: Menu talk
« Reply #6 on: January 20, 2009, 09:25:38 AM »
0
Well cool guys, that helps a lot thanks!!
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Tags: