Newmenu update includes main_menu?

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: Newmenu update includes main_menu?

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

main_menu.name = "Your New Name"

Newmenu update includes main_menu?

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?

Top