Hints for OptionMenu

Moderator: GZDoom Developers

User avatar
m8f
 
 
Posts: 1446
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)

Hints for OptionMenu

Post by m8f »

Hint is a static text that is visible only if the items above are selected.
The number of items above is configurable, and by default is 1.

I thought this kind of thing can be useful both in engine menus and in mod menus (I will definitely use it).
It helps to provide additional information for option menu entries without cluttering the interface.

PR

Hints demo
Last edited by m8f on Sat May 11, 2019 9:49 am, edited 3 times in total.
User avatar
Nash
 
 
Posts: 17465
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Hints for OptionMenu

Post by Nash »

Care to post a video or animated GIF of how this looks like?
User avatar
m8f
 
 
Posts: 1446
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)

Re: Hints for OptionMenu

Post by m8f »



Found out that hints need a bit more work to reliably behave in some corner cases. Fixes are coming soon.

Edit: pushed the fixes.
User avatar
Nash
 
 
Posts: 17465
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Hints for OptionMenu

Post by Nash »

So every line where a Hint widget is added, it adds a new blank line to make room for it? Hmm... not sure how I feel with all those gaps between each line of option... but I also don't have any better ideas currently. Maybe someone else can chime in.
User avatar
m8f
 
 
Posts: 1446
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)

Re: Hints for OptionMenu

Post by m8f »

Yes, Hint takes a line of the menu.
User avatar
Enjay
 
 
Posts: 26571
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Hints for OptionMenu

Post by Enjay »

While I do think it's a neat idea, is it not just something that can be adopted as a mod-specific feature?

If this is adopted as an engine feature complete with hints in gzdoom.pk3, then I assume that the hints will need to be defined in the languages lump and, consequently, it also has implications for those making localisation translations.

I also have concerns about how neat it looks (the taking up of a line) but I don't really have an alternative suggestion.
Gez
 
 
Posts: 17934
Joined: Fri Jul 06, 2007 3:22 pm

Re: Hints for OptionMenu

Post by Gez »

While I like the idea, I don't like this implementation. The hints should all show on a static position of the screen (typically at the bottom) instead of being inserted into the menu list. If you've gotta have separate labels taking up space in the list, then you could as well just make them visible all the time...
User avatar
m8f
 
 
Posts: 1446
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)

Re: Hints for OptionMenu

Post by m8f »

Enjay wrote:is it not just something that can be adopted as a mod-specific feature?
Of course it can. It's in the development version of one of my mods already, and will gradually creep into others.
Enjay wrote:If this is adopted as an engine feature complete with hints in gzdoom.pk3, then I assume that the hints will need to be defined in the languages lump and, consequently, it also has implications for those making localisation translations.
If this class is added to the engine, it doesn't make us to add a description to every single option. It just allows to add such a description, if the developers desire.
Also, the existence of localisation translations shouldn't stop the addition of new strings to the engine in general.
Gez wrote:While I like the idea, I don't like this implementation. The hints should all show on a static position of the screen (typically at the bottom) instead of being inserted into the menu list.
This method of putting description has an issue if it's used with the current option menu implementation:
Image
As you can see, if the screen resolution is low or the menu is long enough, the items and the description overlap (the screenshot is from Nash's Gore Mod: Vengeance Edition v0.9 beta).
Another viable option is to put the description to the top (as was suggested in viewtopic.php?f=46&t=62641&start=90#p1083436). It doesn't have the overlap issue. Still a custom option menu is needed, and a class for each hinted selectable item.
By the way, The Hint item in the PR works for any selectable item out of the box, and can be used as a drop-in replacement of StaticText.
Gez wrote:If you've gotta have separate labels taking up space in the list, then you could as well just make them visible all the time...
Yes, this is a valid option, but the difference is the visual clutter. Compare:
ImageImage
Using the different color for descriptions helps, but not much:
Image
User avatar
Nash
 
 
Posts: 17465
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Hints for OptionMenu

Post by Nash »



Putting it at the top isn't a bad choice, IMO.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49183
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Hints for OptionMenu

Post by Graf Zahl »

I have to agree with Nash here. As implemented the feature is not acceptable. This isn't how hints should be handled. It cannot just be done by adding new menu entries, you'll really have to make some alteration to the menu itself and look out for how it affects customized subclasses (e.g. the flag display for the gameplay and compatibility menus.)
User avatar
m8f
 
 
Posts: 1446
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)

Re: Hints for OptionMenu

Post by m8f »

Noted. Please move this to Closed Feature Suggestions.
Gez
 
 
Posts: 17934
Joined: Fri Jul 06, 2007 3:22 pm

Re: Hints for OptionMenu

Post by Gez »

m8f wrote:As you can see, if the screen resolution is low or the menu is long enough, the items and the description overlap (the screenshot is from Nash's Gore Mod: Vengeance Edition v0.9 beta).
The overlap can be addressed in multiple ways, from preventing the list to be drawn in the hint area to drawing a background box above the list and below the hint label.
User avatar
Enjay
 
 
Posts: 26571
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Hints for OptionMenu

Post by Enjay »

m8f wrote:Also, the existence of localisation translations shouldn't stop the addition of new strings to the engine in general.
Of course not.

I was merely pointing out that any standardised strings should be added to the language lump. Also, that a bunch of new strings for items already in the menus would create a sudden increased shortfall of translated strings for the currently supported languages. Obviously someone would have to work on those to keep language support up to date. That doesn't mean that strings should not be added. It was just an acknowledgement that adding them (particularly a lot of them) means additional work for other parties too.
User avatar
Kinsie
Posts: 7402
Joined: Fri Oct 22, 2004 9:22 am
Graphics Processor: nVidia with Vulkan support
Location: MAP33

Re: Hints for OptionMenu

Post by Kinsie »

Gez wrote:
m8f wrote:As you can see, if the screen resolution is low or the menu is long enough, the items and the description overlap (the screenshot is from Nash's Gore Mod: Vengeance Edition v0.9 beta).
The overlap can be addressed in multiple ways, from preventing the list to be drawn in the hint area to drawing a background box above the list and below the hint label.
The latter is what I did to my alteration of Nash's tooltip code.

Image
User avatar
Nash
 
 
Posts: 17465
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Hints for OptionMenu

Post by Nash »

That could work, since by default, there is space for 1 more line anyway, even for long/scrolling menus (judging from the stock Gameplay Options layout at least)

Return to “Closed Feature Suggestions [GZDoom]”