Show the selected cvar name while navigating the menus

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 ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Show the selected cvar name while navigating the menus

Re: Show the selected cvar name while navigating the menus

by Gez » Sun Apr 14, 2019 9:17 am

I kind of feel like this would be better as a hold than as a toggle. While you keep F1 pressed, you show the code names, and when releasing the key it goes back to normal.

Comedy option: make it a language setting. :p

Re: Show the selected cvar name while navigating the menus

by Rachael » Sun Apr 14, 2019 6: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.

Re: Show the selected cvar name while navigating the menus

by Graf Zahl » Sun Apr 14, 2019 6:13 am

That's why the feature won't be implemented like that.

Re: Show the selected cvar name while navigating the menus

by Enjay » Sun Apr 14, 2019 6: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.

Re: Show the selected cvar name while navigating the menus

by Player701 » Sun Apr 14, 2019 6: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.

Re: Show the selected cvar name while navigating the menus

by _mental_ » Sun Apr 14, 2019 6: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.

Re: Show the selected cvar name while navigating the menus

by Rachael » Sun Apr 14, 2019 5: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.

Re: Show the selected cvar name while navigating the menus

by Player701 » Sun Apr 14, 2019 4: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.

Re: Show the selected cvar name while navigating the menus

by Enjay » Sun Apr 14, 2019 3: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.

Re: Show the selected cvar name while navigating the menus

by _mental_ » Sun Apr 14, 2019 2: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.

Re: Show the selected cvar name while navigating the menus

by Enjay » Sat Apr 13, 2019 3: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).

Re: Show the selected cvar name while navigating the menus

by wildweasel » Fri Apr 12, 2019 11:05 pm

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.

Re: Show the selected cvar name while navigating the menus

by Enjay » Fri Apr 12, 2019 5: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."

Re: Show the selected cvar name while navigating the menus

by Caligari87 » Fri Apr 12, 2019 1: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-)

Top