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

Show the selected cvar name while navigating the menus

Postby Matt » Mon Apr 08, 2019 7:07 pm

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 7:32 pm, edited 2 times in total.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
 
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: Show the selected cvar name while navigating the menus

Postby Trusty McLegit » Fri Apr 12, 2019 2:34 pm

Seconded!
User avatar
Trusty McLegit
 
Joined: 07 Feb 2016

Re: Show the selected cvar name while navigating the menus

Postby Caligari87 » Fri Apr 12, 2019 2:37 pm

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
Caligari87
I'm just here for the community
User Accounts Assistant
 
Joined: 26 Feb 2004
Location: Salt Lake City, Utah, USA
Discord: Caligari87#3089

Re: Show the selected cvar name while navigating the menus

Postby Enjay » Fri Apr 12, 2019 6:44 pm

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
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Show the selected cvar name while navigating the menus

Postby wildweasel » Sat Apr 13, 2019 12:05 am

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
wildweasel
「お前はもうトースト」[you are already toast.]
Moderator Team Lead
 
Joined: 15 Jul 2003

Re: Show the selected cvar name while navigating the menus

Postby Enjay » Sat Apr 13, 2019 4:03 am

True, but press F8, for example, and you get "messages off/messages on" (in red) rather than ""show_messages" is "true/false"" (in white).
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Show the selected cvar name while navigating the menus

Postby _mental_ » Sun Apr 14, 2019 3:56 am

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.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Show the selected cvar name while navigating the menus

Postby Enjay » Sun Apr 14, 2019 4:47 am

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
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Show the selected cvar name while navigating the menus

Postby Player701 » Sun Apr 14, 2019 5:51 am

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
Player701
You are now breathing manually.
 
Joined: 13 May 2009
Location: Russian Federation
Discord: Player701#8214

Re: Show the selected cvar name while navigating the menus

Postby Rachael » Sun Apr 14, 2019 6:20 am

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.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: Show the selected cvar name while navigating the menus

Postby _mental_ » Sun Apr 14, 2019 7:03 am

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.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Show the selected cvar name while navigating the menus

Postby Player701 » Sun Apr 14, 2019 7:11 am

_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
Player701
You are now breathing manually.
 
Joined: 13 May 2009
Location: Russian Federation
Discord: Player701#8214

Re: Show the selected cvar name while navigating the menus

Postby Enjay » Sun Apr 14, 2019 7:12 am

_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
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Show the selected cvar name while navigating the menus

Postby Graf Zahl » Sun Apr 14, 2019 7:13 am

That's why the feature won't be implemented like that.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Show the selected cvar name while navigating the menus

Postby Rachael » Sun Apr 14, 2019 7:32 am

_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.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Next

Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests