Jump to content
  • 0

How do I make a custom options menu?


Gianluco

Question

I'm trying to make a section of the options menu where I can easily set the values of some custom CVars. I've tried reading the wiki, but I can't quite wrap my head around it. How do I do it exactly? I'm on Zandronum, if it helps.

Share this post


Link to post

6 answers to this question

Recommended Posts

  • 0

Menudef and write anything you want.

 

https://zdoom.org/wiki/MENUDEF

 

Specifically:
 

Quote

 

AddOptionMenu

An OptionMenu whose contents are added to an existing OptionMenu.

 

 

 

example:

AddOptionMenu "OptionsMenu" {	
	StaticText "$M_soaOptions"
	
	//StaticText ""
	Command ">> Český jazyk <<", "language csy"
	Command ">> English language <<", "language enu"
	Submenu "$M_u2poptions", "UseToPickupOptions"
	Submenu "$M_tiltplusoptions", "TiltPlusPlusMenu"
	Submenu "$M_flashlightoptions", "FlashlightOptions"
	Submenu "$M_targetspy", "m8f_ts_Options"
	Submenu "$M_hellscapenavigatoroptions", "hn_Options"
	Submenu "$M_swayMenu", "WSOptions"
	Submenu "$M_footstepsoptions", "FootstepOptions"
	//StaticText ""
	Option "lowDetail shader", "gl_lowdetail", "YesNo"
	Option "CRT shader", "cl_crtshader", "YesNo"
	OPtion "Survival", "soa_survival", "YesNo"

	//Submenu "$Blood_Options", "BloodOptions"
	//Submenu "SoA DEBUG menu", "soa_debugMenu"
}

 

Edited by fekete

Share this post


Link to post
  • 0
On 3/21/2024 at 11:26 AM, fekete said:

Menudef and write anything you want.

 

https://zdoom.org/wiki/MENUDEF

 

Specifically:
 

 

 

example:


AddOptionMenu "OptionsMenu" {	
	StaticText "$M_soaOptions"
	
	//StaticText ""
	Command ">> Český jazyk <<", "language csy"
	Command ">> English language <<", "language enu"
	Submenu "$M_u2poptions", "UseToPickupOptions"
	Submenu "$M_tiltplusoptions", "TiltPlusPlusMenu"
	Submenu "$M_flashlightoptions", "FlashlightOptions"
	Submenu "$M_targetspy", "m8f_ts_Options"
	Submenu "$M_hellscapenavigatoroptions", "hn_Options"
	Submenu "$M_swayMenu", "WSOptions"
	Submenu "$M_footstepsoptions", "FootstepOptions"
	//StaticText ""
	Option "lowDetail shader", "gl_lowdetail", "YesNo"
	Option "CRT shader", "cl_crtshader", "YesNo"
	OPtion "Survival", "soa_survival", "YesNo"

	//Submenu "$Blood_Options", "BloodOptions"
	//Submenu "SoA DEBUG menu", "soa_debugMenu"
}

 

AddOptionMenu doesn't work in Zandronum. If I put OptionMenu instead, the setting works, but it's the only one that appears

Share this post


Link to post
  • 0

Well, in this case you uave to either start using gzdoom, or completely manually redefine optiknmenu with your added option...or make a separate menu for your optijns.

Share this post


Link to post
  • 0
2 hours ago, fekete said:

Well, in this case you uave to either start using gzdoom, or completely manually redefine optiknmenu with your added option...or make a separate menu for your optijns.

How do I do the latter?

Share this post


Link to post
  • 0

Please, pay some time for studying menudef, you'll find out. There are even examples on the wiki...

Edited by fekete

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...