Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Display cvar name (and possibly description) when hovering an option in menus #1972

Open
Calinou opened this issue Jan 26, 2023 · 6 comments

Comments

@Calinou
Copy link
Contributor

Calinou commented Jan 26, 2023

GZDoom version

Git 10b6d21

Which game are you running with GZDoom?

Doom 2

What Operating System are you using?

Linux x86_64

If Other OS, please describe

N/A

Relevant hardware info

N/A

Is your feature request related to a problem? Please describe.

When tweaking menu settings, I need to check the menus' source code to know which setting maps to which cvar.

There are two use cases where this is useful:

  • Set a cvar outside the allowed range in the menu.
  • Toggle a cvar with a keybinding (using bind X toggle ...).

Describe the solution you'd like

Display the associated cvar name, current value and default value at the bottom of the menus. This mockup reuses the text that is printed in the console when typing the cvar name alone:1

image

This could also be an opportunity to display a cvar description (1-2 lines). Example from ezQuake:

ezquakesimple webp

After pressing F1 while hovering the option:

ezquakefull webp

Describe alternatives you've considered

Checking menudef.txt with a text editor. This works, but isn't as convenient.

Add any other context or screenshots about the feature request here.

Mockups are above.

Footnotes

  1. I got the cvar value wrong on the mockup, disregard it 🙂

@CandiceJoy
Copy link
Member

I feel like documentation would serve this purpose better, but I could also be wrong ^_^

@Calinou
Copy link
Contributor Author

Calinou commented Jan 26, 2023

I feel like documentation would serve this purpose better, but I could also be wrong ^_^

Cross-referencing documentation is a lot more time-consuming in comparison, especially if it can't easily be Ctrl + F'd.

@nashmuhandes
Copy link
Contributor

This has been done several times as bespoke, homebrew mod code that at this point, I feel like this should just be a standard ZScript feature that all mods can utilize.

Can be done easily, if anyone is up to the task for it.

@Player701
Copy link
Contributor

As an author of one of such "homebrew" implementations, I'd highly appreciate if there were also a way to override this functionality (i.e. disable it entirely) in custom ZScript-based menus, so that it wouldn't clash with the mod's own implementation. Or, better yet - disable it entirely in custom menus by default.

NB: by "custom" here I specifically mean ZScript, not MENUDEF - that is, any user-defined menu class inherited from the built-in OptionMenu or one of its descendants.

Although that'd probably be a moot point if it looked like on those screenshots from ezQuake, as that one seems to be about on par with my own version (which I might then be able to get rid of). There's still the problem with latch cvars, though...

@rrPKrr
Copy link

rrPKrr commented Jan 26, 2023

I remember there was an excellent commit that made it possible to toggle menu items to cvar names by pressing F1 while in menus. Could somebody point me to this mentioned commit please?

@madame-rachelle
Copy link
Collaborator

This doesn't actually address the feature request, but until this is implemented, this may help:

GZDoom as of a recent commit includes the ccmd cvarsearch - just type in what you remember the menu text saying, it will search the descriptions and tell you the cvar it was.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants