Show the selected cvar name while navigating the menus

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Show the selected cvar name while navigating the menus

Post by Matt »

Sometimes I want to set a value, or at least see if I can set a value, for a cvar that is somewhere between the notches of the slider, or it's a value that's buried under a number of submenus that I want to change on the fly several times in one sitting and would like to use the console instead. Other times I just want to know what that cvar is called.

Would be great if the name of the cvar could be made to pop up in the corner or something.

EDIT: or something like
Caligari87 wrote:Ideally, perhaps this could be made an option to show anytime a CVar changes without the console being open.
though I don't know how that would interact with things like toggling cl_run in that way that prevents that message from appearing
Last edited by Matt on Fri Apr 12, 2019 6:32 pm, edited 2 times in total.
User avatar
Trusty McLegit
Posts: 264
Joined: Sun Feb 07, 2016 8:42 pm

Re: Show the selected cvar name while navigating the menus

Post by Trusty McLegit »

Seconded!
User avatar
Caligari87
Admin
Posts: 6174
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Re: Show the selected cvar name while navigating the menus

Post by Caligari87 »

Sort of like how "cl_run" pops up as a message when toggling run. Ideally, perhaps this could be made an option to show anytime a CVar changes without the console being open.

8-)
User avatar
Enjay
 
 
Posts: 26508
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Show the selected cvar name while navigating the menus

Post by Enjay »

I agree that it could be useful. I also agree that it should be optional.

Even the cl_run thing looks ugly to me and I never really understood why it is one of the very few things that kind of message is displayed about and, even more, why it is such a "techy" message rather than something done in a more presentable "human English" way. e.g "Autorun Enabled/Disabled."
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: Show the selected cvar name while navigating the menus

Post by wildweasel »

Enjay wrote:I agree that it could be useful. I also agree that it should be optional.

Even the cl_run thing looks ugly to me and I never really understood why it is one of the very few things that kind of message is displayed about and, even more, why it is such a "techy" message rather than something done in a more presentable "human English" way. e.g "Autorun Enabled/Disabled."
To be fair, it's the result of the "autorun" key being nothing more than toggle cl_run - where it could really be any other boolean at all, so it's a generic message.
User avatar
Enjay
 
 
Posts: 26508
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Show the selected cvar name while navigating the menus

Post by Enjay »

True, but press F8, for example, and you get "messages off/messages on" (in red) rather than ""show_messages" is "true/false"" (in white).
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Show the selected cvar name while navigating the menus

Post by _mental_ »

I propose a little bit different solution.

By pressing F1 in any options menu user can toggle display of console variables/commands and submenu names.
menu_controls.jpg
menu_hud.jpg
If you want to give it try, here is the pull request.
User avatar
Enjay
 
 
Posts: 26508
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Show the selected cvar name while navigating the menus

Post by Enjay »

I'm looking at this on my phone, so I can't check it properly, but that seems like a great idea. I don't see anything in the commit that tells the user about this function. I think it would be important to "advertise" it somewhere on screen so that people know it exists and, perhaps more importantly, if they hit F1 by accident, they know what they did and how to undo it.
User avatar
Player701
 
 
Posts: 1632
Joined: Wed May 13, 2009 3:15 am
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Show the selected cvar name while navigating the menus

Post by Player701 »

If this is added, please include an option to disable this feature for custom menus via ZScript. RRWM already implements something similar (but with extensive full-text descriptions instead of just CVAR names), and I'd really like it if I don't have to resort to hacks to turn off the built-in functionality.
User avatar
Rachael
Posts: 13527
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Show the selected cvar name while navigating the menus

Post by Rachael »

I'm not sure if this should be added as-is anyway. There are some things that just don't make sense to be exported like this - particularly the preset resolution selector in the resolution menu. Those CCMDs are built exclusively for menu access and should not be run from the console.

Other than that though, I really do like _mental_'s solution.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Show the selected cvar name while navigating the menus

Post by _mental_ »

Enjay wrote:I don't see anything in the commit that tells the user about this function. I think it would be important to "advertise" it somewhere on screen so that people know it exists and, perhaps more importantly, if they hit F1 by accident, they know what they did and how to undo it.
I have no idea how this needs to be advertised. Apparently, this is the feature for advanced users.
If someone presses F1 in options menu by occasion, well, don't do it than.
The only thing I can do in this case is to change hotkey to toggle displaying of commands.
Player701 wrote:If this is added, please include an option to disable this feature for custom menus via ZScript. RRWM already implements something similar (but with extensive full-text descriptions instead of just CVAR names), and I'd really like it if I don't have to resort to hacks to turn off the built-in functionality.
Did you try this change with your mod? I think you don't, because help screens continue to function as advertised.
You can always override existing methods and do whatever you want to do there.
Rachael wrote:I'm not sure if this should be added as-is anyway. There are some things that just don't make sense to be exported like this - particularly the preset resolution selector in the resolution menu. Those CCMDs are built exclusively for menu access and should not be run from the console.
With very little code I implemented a rather useful option to debug options menus.
If some of the items are not suitable for direct usage via openmenu, there is no point to disable it for all submenus or console commands.

To summarize, if you know exactly how to make it better, please tell me. Some subjective concerns aren't really helpful.
User avatar
Player701
 
 
Posts: 1632
Joined: Wed May 13, 2009 3:15 am
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Show the selected cvar name while navigating the menus

Post by Player701 »

_mental_ wrote:Did you try this change with your mod? I think you don't, because help screens continue to function as advertised.
You can always override existing methods and do whatever you want to do there.
The problem is that currently it's possible to switch the option display mode in another menu, and if the mod menu is entered afterwards, the mode can't be switched back from there unless a non-option menu item is selected (and there is currently only one such item in there). Changing the toggle trigger from F1 to some other key would also solve this issue, but it'd be best if there were a flag (in the menu descriptor or somewhere else) that prevents labels from being replaced by CVAR names altogether.
User avatar
Enjay
 
 
Posts: 26508
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Show the selected cvar name while navigating the menus

Post by Enjay »

_mental_ wrote:I have no idea how this needs to be advertised. Apparently, this is the feature for advanced users.
If someone presses F1 in options menu by occasion, well, don't do it than.
The only thing I can do in this case is to change hotkey to toggle displaying of commands.
All I meant was, perhaps, something like "Press F1 to toggle cvar names" being in the menu somewhere.

Or, perhaps, when you press F1, a little message pops up (like the ones we have been discussing) to say "menu cvar names are on/off".

It's very easy to accidentally press an unintended button on a keyboard, not realise which button you have hit and therefore not be sure what to do to return the setting to normal. I can easily imagine people hitting F1 by accident (it's beside Esc, near the numbers and near the console button on a UK keyboard - though I'm not sure that I've ever done it) and then someone posts a "GZDoom messed up my menus" report.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49053
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Show the selected cvar name while navigating the menus

Post by Graf Zahl »

That's why the feature won't be implemented like that.
User avatar
Rachael
Posts: 13527
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Show the selected cvar name while navigating the menus

Post by Rachael »

_mental_ wrote:With very little code I implemented a rather useful option to debug options menus.
If some of the items are not suitable for direct usage via openmenu, there is no point to disable it for all submenus or console commands.

To summarize, if you know exactly how to make it better, please tell me. Some subjective concerns aren't really helpful.
If this feature is exclusively for debugging, then I think it should be a more complex key combination to activate it. It's pretty easy to tap F1 without realizing it, especially if you're on a macro keyboard without drivers (i.e. Logitech G105 where the macro row becomes function keys). For instance - CTRL+F1 would work for that.

Outside of debugging, though, a person may just want to find out what CVAR or CCMD is for what. In "CustomResolutionMenu" there are a bunch of entries that run the console commands "menu_resolution_set_custom <x> <y>" - these will do nearly nothing when used from the console and therefore are not useful. Instead, at least for these specific cases, I would check for the "fullscreen" variable, and if it's true show "vid_setscale" for these options - otherwise "vid_setsize".

I don't know - maybe there are other instances too? Needless to say - the command "menu_resolution_set_custom" is not useful to the end user at all.

The use that I have for this feature is learning which CVAR is for what in the menu. If I am debugging I am just going to look at the menudef directly.

If this is a flaw in how I implemented that menu, I am open to suggestions to make it better. But it's the best that I could think of, considering that some people were quite upset in its absence, and it pretty much fills the niche of doing what it does.
Post Reply

Return to “Feature Suggestions [GZDoom]”