Newmenu update includes main_menu?

Hugo programming discussion.
Hugo By Example:
Roody Yogurt's Hugo Blog:

Moderators: Ice Cream Jonsey, AArdvark, Kent

Post Reply
Posts: 151
Joined: Fri Jul 09, 2010 8:59 am

Newmenu update includes main_menu?

Post by Bainespal » Wed Mar 13, 2013 3:01 pm

I downloaded the new version of Roodylib from the IF Archive as mentioned on Not Dead Hugo, and I saw that there were new versions of newmenu.h and beta.h, so I grabbed them too.

Tree and Star wasn't compiling with the latest version of newmenu, due to the lines where I defined "menu category main_menu". It said that main_menu was already defined.

I see that main_menu is defined on line 1156 of newmenu.h, so I simply commented out my version, and it compiles. I believe the commented documentation needs updating, because it still says this:
This extension *expects* a menu_category object named main_menu. Add the following to your code.

menu_category main_menu "TITLE OF YOUR MAIN MENU"
I like the change, in general. Before, I kind of felt that the main_menu object could be part of the library. I'm fine with the default heading as the game title, but is there a way to change it?

Posts: 1993
Joined: Mon Apr 29, 2002 6:23 pm
Location: Milwaukee

Post by Roody_Yogurt » Wed Mar 13, 2013 4:57 pm

Thanks for this. Hidden in the changelog, I mention the change to newmenu-including-a-main_menu-object, but you're right, it should be changed there, too. In the future, that section will read:
This extension *expects* a menu_category object named main_menu. One is provided by newmenu.h, but if you need to replace it, do the following:

replace main_menu "TITLE OF YOUR MAIN MENU"
inherits menu_category
To answer your question, to change the menu title, you can either do the above or have a line like the following in init or SetGlobalsAndFillArrays:

Code: Select all = "Your New Name"

Post Reply