My New Menu System

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:smile: :sad: :eek: :shock: :cool: :-x :razz: :oops: :evil: :twisted: :wink: :idea: :arrow: :neutral: :mrgreen:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: My New Menu System

by Roody_Yogurt » Thu Dec 06, 2012 12:17 pm

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.

by Roody_Yogurt » Sun Mar 04, 2012 12:33 pm

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

by Roody_Yogurt » Mon Jan 30, 2012 7:42 pm

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.

by Roody_Yogurt » Sat Jan 28, 2012 7:40 pm

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.

by Roody_Yogurt » Fri Jan 13, 2012 3:10 pm

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.

by Bainespal » Wed Jan 11, 2012 1:40 pm

Roody_Yogurt wrote:Some of the line spacing in the transcript notation might be actually my fault; I kind of put in whatever looked good to me at the time.
No, it was simply a matter of my putting consistent new lines. It looks better now.

by Roody_Yogurt » Wed Jan 11, 2012 11:11 am

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

Re: My New Menu System

by Tdarcos » Wed Jan 11, 2012 11:05 am

Roody_Yogurt wrote:Plus, it tries to make Guilty Bastard style hints easier to look at, too.
What on earth is a 'Guilty Bastard Style' hint?

by Roody_Yogurt » Tue Jan 10, 2012 11:37 pm

Glad it works to your liking. Some of the line spacing in the transcript notation might be actually my fault; I kind of put in whatever looked good to me at the time. Whatever mistakes are there, in any case, I think it looks better than what it did previously.

by Bainespal » Tue Jan 10, 2012 9:57 pm

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.

by Roody_Yogurt » Tue Jan 10, 2012 6:44 pm

That is correct! (Besides including the files, you'll have to add "glkcheck" to the init routine)

Again, though, if you don't care how menus look (or don't work) under glk interpreters, you don't need to use glk.h or cheapglk.h at all.

by Bainespal » Tue Jan 10, 2012 6:39 pm

I take it that including glk and cheapglk is helpful when using the new menu extension even if the game has no other use of features that don't work in glk, because these extensions will make the menus look alright in glk/cheapglk interpreters. Is that correct?

My New Menu System

by Roody_Yogurt » Mon Jan 09, 2012 3:28 pm

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!

Top