Adding new menus to MENUDEFS without overwriting

Moderator: GZDoom Developers

Post Reply
User avatar
Kyle873
Posts: 667
Joined: Thu Jun 28, 2012 11:48 am
Location: Ontario, Canada

Adding new menus to MENUDEFS without overwriting

Post by Kyle873 »

Simply, when one loads two different mods that modify the OptionsMenu node, the mod loaded last will take over and overwrite the previous menu's definition. Therefore, it's impossible to load two mods with MENUDEFS modifying the said OptionsMenu node without blocking access to one of the menus. At least, not without frankenstitching the MENUDEFS together or some such.

What I'm asking for is a simple keyword or method to simple tell the MENUDEF to add a new menu to the already existing OptionsMenu node (or any other if necessary/needed) so that these types of conflicts would no longer occur.

In this example case, I'm referring to Doom RPG and Droplets, both of which use menus for settings adjustment, but only that which is loaded last will take precedence over the menu modification.
User avatar
Nash
 
 
Posts: 17503
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Adding new menus to MENUDEFS without overwriting

Post by Nash »

Yes x 0x7FFFFFFF

(TBH I feel it should have been designed additively in the first place :S)
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: Adding new menus to MENUDEFS without overwriting

Post by Ed the Bat »

I wholeheartedly support this suggestion.
User avatar
Lord Misfit
Posts: 227
Joined: Wed Dec 27, 2006 8:13 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: Canton, OH
Contact:

Re: Adding new menus to MENUDEFS without overwriting

Post by Lord Misfit »

Agree with this too. While I've not run afoul of the issue yet, I'm sure I eventually will, and knowing I wouldn't need to worry about this at all would be great. :o
User avatar
Enjay
 
 
Posts: 27195
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Adding new menus to MENUDEFS without overwriting

Post by Enjay »

It would certainly have to be optioned with a keyword or something. Otherwise, how could a mod alter existing menus to remove or move items? (This, of course, isn't usually desirable but it can be for stand alone mods/games.)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Adding new menus to MENUDEFS without overwriting

Post by Graf Zahl »

added
User avatar
Nash
 
 
Posts: 17503
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Adding new menus to MENUDEFS without overwriting

Post by Nash »

Here's how to use this, in case anyone is wondering.

In your MENUDEF, simply add this

Code: Select all

AddOptionMenu "OptionsMenu"
{
    // Your custom menu and widgets go here
    // It will be appended after the built-in OptionsMenu
    StaticText "My Custom Options"
    Slider "My Custom Slider", "cl_custom_cvar", 0, 20, 1
}
 
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”