PKr Posted February 21, 2023 Long story short I want to add a new option item to the main menu to switch a newly added cvar. The problem is I can't understand how Doom 3 connects cvars with the options menu. I have checked a cstdoom3 code, and for example, you can switch cst_noStaminaDrop cvar there which affects a new menu item called "Stamina Drop" (it switches it to YES/NO). But I can't see a single reference of "cst_noStaminaDrop" being used anywhere outside of functions that affect stamina usage behavior. Can somebody explain to me how Doom 3 draws its options menu, or give me a hint as to what functions to look at? 0 Quote Share this post Link to post
GuyMcBrofist Posted February 22, 2023 (edited) "guis\mainmenu.gui" Is where you'll find the definition of the main menu including the options menu (talking about vanilla doom 3 here), which you can find in pak000.pk4. There, you'll see some entries that use a "cvar" key to refer to the cvar the menu item changes. Doom 3 comes with a GUI editor, which you can use by typing "editGUIs" in the console. Not sure how useful you'll find it. I can get it to open GUIs and browse the elements, but just get a blank window where it's supposed to visually show the gui (edit: turns out having r_multisampling set to non-zero was causing this). I can't speak much for cstdoom3, it's packaged a bit strangely and I didn't bother to install it. Edited February 23, 2023 by GuyMcBrofist 2 Quote Share this post Link to post
PKr Posted February 22, 2023 (edited) Thanks a lot! Wouldn't have figured this out without your help. Edited February 22, 2023 by PKr 1 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.