View previous topic :: View next topic |
Author |
Message |
TwinHamster ♫ Furious souls, burn eternally! ♫

Joined: 07 Mar 2004 Posts: 1352
|
Posted: Fri Aug 07, 2009 8:34 am Post subject: Menu Fiddling |
|
|
I'm trying to set up a menu that contains 8 items and changes its item captions throughout the game.
These items will always contain the same function, but is there any simple method to just rename the items?
Or am I just going to have to set up a system of 'create menu's?
Menu ID's don't seem to function with any of the Menu Scripting Functions, so I'm guessing I'll be looking at #2.
But it'd be great if I could just do the renaming thing. |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Fri Aug 07, 2009 9:11 am Post subject: Re: Menu Fiddling |
|
|
TwinHamster wrote: | I'm trying to set up a menu that contains 8 items and changes its item captions throughout the game.
These items will always contain the same function, but is there any simple method to just rename the items?
Or am I just going to have to set up a system of 'create menu's? |
Code: | set menu item caption(menu item handle, string ID) |
TwinHamster wrote: | Menu ID's don't seem to function with any of the Menu Scripting Functions, so I'm guessing I'll be looking at #2.
But it'd be great if I could just do the renaming thing. |
I think you must be confusing menu handles and menu item handles. They are not interchangeable.
Depending on how you want to do it, you will need either
Code: | menu item by slot(menu handle, slot) |
or
Code: | find menu item caption(menu handle, string ID) |
to get the menu item handles that you want to change. |
|
Back to top |
|
 |
TwinHamster ♫ Furious souls, burn eternally! ♫

Joined: 07 Mar 2004 Posts: 1352
|
Posted: Fri Aug 07, 2009 9:57 am Post subject: |
|
|
James wrote: | menu item by slot(menu handle, slot) |
Aha, That's what I was hoping existed!
Thanks a bunch! |
|
Back to top |
|
 |
Ysoft_Entertainment VB Programmer

Joined: 23 Sep 2003 Posts: 810 Location: Wherever There is a good game.
|
Posted: Mon Sep 07, 2009 3:21 pm Post subject: |
|
|
Well, there is another of changing menu's caption, thats what I did in my recent game. In the caption just write ${s(string you want to use)} and voila, every time you want to change the caption, just change the string value. Of course this method leaves you with less strings to work with.
Of course you could initialize the string before opening the menu, and clear the string after you close the menu, then if you want to use that string in another script, you can do so. _________________ Try my OHR exporter/importer.
OHRGFX
Striving to become better pixel artist then Fenrir Lunaris. Unfortunately the laziness gets in the way of my goals. |
|
Back to top |
|
 |
|