My New Menu System
Moderators: Ice Cream Jonsey, joltcountry
-
- Posts: 2256
- Joined: Mon Apr 29, 2002 6:23 pm
- Location: Milwaukee
My New Menu System
I have released my new menu replacement extension! The most important thing is that it makes menus more compatible with glk and cheapglk interpreters, but even if you do not use that, it attempts to make transcripts prettier and menu set-up a tad easier. Plus, it tries to make Guilty Bastard style hints easier to look at, too.
Anyhow, usage is explained in the comments in the newmenu.h file. A sample game is included also.
Even if you have your own glk-detecting code, to use the glk aspects of this extension, you DO need to use glk.h and cheapglk.h, as they set important flags.
Eventually, I will write a Hugo By Example page for both this (and the new cheapglk library). In the meantime, enjoy!
http://roody.gerynarsabode.org/hbe/newmenu.zip
When you give it a spin, be sure to make a transcript and try various choices. Try it with Gargoyle, too!
Anyhow, usage is explained in the comments in the newmenu.h file. A sample game is included also.
Even if you have your own glk-detecting code, to use the glk aspects of this extension, you DO need to use glk.h and cheapglk.h, as they set important flags.
Eventually, I will write a Hugo By Example page for both this (and the new cheapglk library). In the meantime, enjoy!
http://roody.gerynarsabode.org/hbe/newmenu.zip
When you give it a spin, be sure to make a transcript and try various choices. Try it with Gargoyle, too!
-
- Posts: 151
- Joined: Fri Jul 09, 2010 8:59 am
-
- Posts: 2256
- Joined: Mon Apr 29, 2002 6:23 pm
- Location: Milwaukee
-
- Posts: 151
- Joined: Fri Jul 09, 2010 8:59 am
I added this to World Builder and sent you a transcript at the email in the comment at the top of newmenu.h.
I would never have planned to use a menu at all. I never looked into using menus because they seemed complicated and I never got to the ending stages of tuning up a game before. The menu generated by newmenu.h looks perfect! Thanks for the extension.
I forgot to mention in the email that I made the transcript with the Hugo Debugger. I haven't looked at it in a glk interpreter or in Hugor. However, I did include glk.h and cheapglk.h as well as newmenu.h.
I would never have planned to use a menu at all. I never looked into using menus because they seemed complicated and I never got to the ending stages of tuning up a game before. The menu generated by newmenu.h looks perfect! Thanks for the extension.
I forgot to mention in the email that I made the transcript with the Hugo Debugger. I haven't looked at it in a glk interpreter or in Hugor. However, I did include glk.h and cheapglk.h as well as newmenu.h.
-
- Posts: 2256
- Joined: Mon Apr 29, 2002 6:23 pm
- Location: Milwaukee
- Tdarcos
- Posts: 9556
- Joined: Fri May 16, 2008 9:25 am
- Location: Arlington, Virginia
- Contact:
Re: My New Menu System
What on earth is a 'Guilty Bastard Style' hint?Roody_Yogurt wrote:Plus, it tries to make Guilty Bastard style hints easier to look at, too.
"When I die, I want it easy and peaceful in my sleep, like my uncle.
Not screaming and crying like his passengers."
Not screaming and crying like his passengers."
-
- Posts: 2256
- Joined: Mon Apr 29, 2002 6:23 pm
- Location: Milwaukee
It means they are styled after the hint system used in the game 'Guilty Bastards', an early yet prominent Hugo game by Kent Tessman:
http://mirror.ifarchive.org/if-archive/ ... guilty.zip
http://mirror.ifarchive.org/if-archive/ ... guilty.zip
-
- Posts: 2256
- Joined: Mon Apr 29, 2002 6:23 pm
- Location: Milwaukee
I made a small change, so newmap.h is now at version 1.1 ( http://roody.gerynarsabode.org/hbe/newmenu.zip ).
I decided that I didn't like that I had hardcoded a blank line between the menu title and the "[N]ext Item" text, so now there is a title_gap property for menucategory objects. If you want a blank space, put a true value there. Otherwise, leave it as it is. I thought this'd allow authors to get menus looking exactly how they like.
Ideally, I'd throw every bit of printed text to a "replace NewMessages" routine for easily swappable-text, but I'm saving that for another day.
I decided that I didn't like that I had hardcoded a blank line between the menu title and the "[N]ext Item" text, so now there is a title_gap property for menucategory objects. If you want a blank space, put a true value there. Otherwise, leave it as it is. I thought this'd allow authors to get menus looking exactly how they like.
Ideally, I'd throw every bit of printed text to a "replace NewMessages" routine for easily swappable-text, but I'm saving that for another day.
-
- Posts: 2256
- Joined: Mon Apr 29, 2002 6:23 pm
- Location: Milwaukee
I've changed my messaging approach. Until recently, I had mistakenly been trying to have all regular routine messages get directed to NewMessages, all object messages to NewOMessages, all verb routines to NewVMessages, and so forth. I finally realized that the way Christopher Tate's contribution handles it is the best way; all messaging routines should be self-contained to their file, so beta.h has a BetaMessage routine that looks to NewBetaMessages for replacements, and so on.
I've updated newmenu.zip, simpletalk.zip, and beta.h to reflect this code design. While doing so, I found bugs in the newmenu extension and simpletalk, so if you use either of those, I recommend updating. Links to the files can be found here.
I've updated newmenu.zip, simpletalk.zip, and beta.h to reflect this code design. While doing so, I found bugs in the newmenu extension and simpletalk, so if you use either of those, I recommend updating. Links to the files can be found here.
-
- Posts: 2256
- Joined: Mon Apr 29, 2002 6:23 pm
- Location: Milwaukee
I've also updated the Footnotes library contribution ( http://hugo.gerynarsabode.org/index.php ... ibution%29 ) to be more message-configurable. Also, I got rid of an extraneous property array and added default support to Guilty Bastards "footnote always" mode.
-
- Posts: 2256
- Joined: Mon Apr 29, 2002 6:23 pm
- Location: Milwaukee
So yesterday, I thought it was time to finally upload some of my library contributions to the IF Archive, including my menu update. Of course, as luck would have it, later that day, while putting menus into my WIP, I realized that colors are messed up when people actually define the hugolib-provided MENU_TEXTCOLOR, MENU_BGCOLOR, MENU_SELECTCOLOR, and MENU_SELECTBGCOLOR global variables.
Fortunately for my ego, part of the problem was due to the original menu routine. Like, if you have a non-black default background, in CZK, when you go to the in-game options menu, menu options are on "islands" of color, instead of the whole page.
Unfortunately, the "islands" effect sometimes looks kind of cool so I feel bad about turning it off completely, but I guess consistency is the more important thing here.
Anyhow, I've updated newmenu.h both to fix this issue, and I also provided some color-holding properties for menu_category objects so you can have connected menus have different color schemes. I haven't been able to decide whether this is overkill.
I think I'm going to sit on this one a bit longer before I upload it to HbE and the IF archive, just in case there are some more tweaks ahead, but you guys can take a look at it now:
http://roody.gerynarsabode.org/JC/test/newmenu.h
Fortunately for my ego, part of the problem was due to the original menu routine. Like, if you have a non-black default background, in CZK, when you go to the in-game options menu, menu options are on "islands" of color, instead of the whole page.
Unfortunately, the "islands" effect sometimes looks kind of cool so I feel bad about turning it off completely, but I guess consistency is the more important thing here.
Anyhow, I've updated newmenu.h both to fix this issue, and I also provided some color-holding properties for menu_category objects so you can have connected menus have different color schemes. I haven't been able to decide whether this is overkill.
I think I'm going to sit on this one a bit longer before I upload it to HbE and the IF archive, just in case there are some more tweaks ahead, but you guys can take a look at it now:
http://roody.gerynarsabode.org/JC/test/newmenu.h
-
- Posts: 2256
- Joined: Mon Apr 29, 2002 6:23 pm
- Location: Milwaukee
I just uploade version 2.6 to http://roody.gerynarsabode.org/hbe/newmenu.zip. Other than fixing some bugs with the default menu, I also changed up the default look of "press a key" text in the CoolPause routine. Instead of being prefaced by a not-tied-to-anything number of spaces, it is now just a regular indent, and instead of being bold, the text defaults to being italicized. I may/probably-will make it further customizable down the road, but I figured this is an improvement for now.