Adding new menus to MENUDEFS without overwriting

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Adding new menus to MENUDEFS without overwriting

Re: Adding new menus to MENUDEFS without overwriting

by Nash » Thu Mar 02, 2017 10:48 am

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
}
 

Re: Adding new menus to MENUDEFS without overwriting

by Enjay » Sat Jan 31, 2015 6:00 am

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.)

Re: Adding new menus to MENUDEFS without overwriting

by Lord Misfit » Fri Jan 30, 2015 8:57 am

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

Re: Adding new menus to MENUDEFS without overwriting

by Ed the Bat » Fri Jan 30, 2015 12:18 am

I wholeheartedly support this suggestion.

Re: Adding new menus to MENUDEFS without overwriting

by Nash » Thu Jan 29, 2015 10:57 pm

Yes x 0x7FFFFFFF

(TBH I feel it should have been designed additively in the first place :S)

Adding new menus to MENUDEFS without overwriting

by Kyle873 » Thu Jan 29, 2015 7:20 pm

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.

Top