View previous topic :: View next topic |
Author |
Message |
Bagne ALL YOUR NUDIBRANCH ARE BELONG TO GASTROPODA

Joined: 19 Feb 2003 Posts: 518 Location: Halifax
|
Posted: Sun Nov 01, 2009 6:55 pm Post subject: Menu editing |
|
|
Is there any documentation/tutorials on menu editing?
The wiki has an unwritten entry on menu editing in custom.
If not, it's not too big a deal.
I've got most of it figured out. _________________ Working on rain and cloud formation |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Sun Nov 01, 2009 7:17 pm Post subject: |
|
|
Did you try F1 in the menu editor? Not sure if there's anything there, but it's worth a try. _________________
|
|
Back to top |
|
 |
Bagne ALL YOUR NUDIBRANCH ARE BELONG TO GASTROPODA

Joined: 19 Feb 2003 Posts: 518 Location: Halifax
|
Posted: Sun Nov 01, 2009 7:38 pm Post subject: |
|
|
What ... does F1 do?
It's not doing anything for me.
I tried it in the menu editor, and some other editors as well.
Another question:
Can menus call scripts? Can they pass arguments?
(He asked, while expecting both answers to be "no")
Hm, I suppose that I need to use a script to open a custom menu to begin with... so ... all I have to do is let the menu items set a tag, and the already-running script's flow will depend on the tags.
Oh ... and ... there's that "Extra data" or something.
Is that used to change some sort of global variable (he said, expecting the answer to be "yes")? _________________ Working on rain and cloud formation |
|
Back to top |
|
 |
Guest
|
Posted: Sun Nov 01, 2009 7:52 pm Post subject: |
|
|
F1 calls a help screen in the nightlies. I'm working on getting them cleaned up grammatically and making sure there's one for every screen; if you download the latest nightly I'm pretty sure there's already a pretty decent help text for editting menues.
Menues can call scripts - it is one of the types you can assign to a menu item in custom. No arguments, but that's basically what the "extra data" is for - you can read this data with plotscripting:
"get menu item extra (menu handle, which data slot)" |
|
Back to top |
|
 |
Bagne ALL YOUR NUDIBRANCH ARE BELONG TO GASTROPODA

Joined: 19 Feb 2003 Posts: 518 Location: Halifax
|
Posted: Sun Nov 01, 2009 8:30 pm Post subject: |
|
|
sweet.
Thanks. _________________ Working on rain and cloud formation |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Sun Nov 01, 2009 8:45 pm Post subject: |
|
|
I'm pretty sure the menu item extras are passed as arguments. _________________
|
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sun Nov 01, 2009 9:14 pm Post subject: |
|
|
Quote: | Hm, I suppose that I need to use a script to open a custom menu to begin with... so ... all I have to do is let the menu items set a tag, and the already-running script's flow will depend on the tags. |
You can make your menu a submenu of the main menu; the only other way to open a menu is by script. Hmmm... maybe we ought to add the ability to attach menus to key combinations directly. And scripts. Wait, that's kind of redundant once a global keypress script option is added.
Anyway, a menu may either pause all running scripts or not.
Code: | * Menu scripts on menus with the "suspend gameplay" bit turned on
receive extra menu data as arguments. (Menu scripts on normal
menus still receive a menu item handle) [James] |
gameplay enabled:
Code: | plotscript, my menuitem script, menuitem ref, begin ... |
(and then use get menu item extra as msw said)
gameplay disabled:
Code: | plotscript, my menuitem script, extra0, extra1, extra2, begin ... |
_________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
msw188
Joined: 02 Jul 2003 Posts: 1041
|
Posted: Mon Nov 02, 2009 11:20 am Post subject: |
|
|
Haha, I often just answer as a guest when I don't feel like going through logging in, but I think it's funny that TMC still knew it was me.
I don't know about having the arguments change depending on the suspend gameplay bitset. I'd think that the menu item handle ought to always be passed as the first argument, or does the 'suspend gameplay' bit basically mean that the script can't be run until the menu is closed, thereby making that handle useless? _________________ My first completed OHR game, Tales of the New World:
http://castleparadox.com/gamelist-display.php?game=161
This website link is for my funk/rock band, Euphonic Brew:
www.euphonicbrew.com |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Mon Nov 02, 2009 1:11 pm Post subject: |
|
|
msw188 wrote: | I don't know about having the arguments change depending on the suspend gameplay bitset. I'd think that the menu item handle ought to always be passed as the first argument, or does the 'suspend gameplay' bit basically mean that the script can't be run until the menu is closed, thereby making that handle useless? |
Yeah, exactly. When gameplay & scripts are suspended, the script doesn't run until right *after* the menu closes, so the handle is dead by then anyway.
Passing the extra in that situation just seemed better than passing nothing at all. |
|
Back to top |
|
 |
|