[No] Hints for OptionMenu

Moderator: GZDoom Developers

Hints for OptionMenu

Postby m8f » Sat May 11, 2019 12:04 am

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 10:49 am, edited 3 times in total.
User avatar
m8f
the dreamer
 
 
 
Joined: 29 Dec 2017
Discord: m8f#0629
Github ID: mmaulwurff

Re: Hints for OptionMenu

Postby Nash » Sat May 11, 2019 1:38 am

Care to post a video or animated GIF of how this looks like?
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Hints for OptionMenu

Postby m8f » Sat May 11, 2019 10:25 am



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
m8f
the dreamer
 
 
 
Joined: 29 Dec 2017
Discord: m8f#0629
Github ID: mmaulwurff

Re: Hints for OptionMenu

Postby Nash » Sat May 11, 2019 10:58 am

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
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Hints for OptionMenu

Postby m8f » Sat May 11, 2019 11:01 am

Yes, Hint takes a line of the menu.
User avatar
m8f
the dreamer
 
 
 
Joined: 29 Dec 2017
Discord: m8f#0629
Github ID: mmaulwurff

Re: Hints for OptionMenu

Postby Enjay » Sat May 11, 2019 2:20 pm

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.
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: Hints for OptionMenu

Postby Gez » Sat May 11, 2019 2:46 pm

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...
Gez
 
 
 
Joined: 06 Jul 2007

Re: Hints for OptionMenu

Postby m8f » Sat May 11, 2019 7:33 pm

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
m8f
the dreamer
 
 
 
Joined: 29 Dec 2017
Discord: m8f#0629
Github ID: mmaulwurff

Re: Hints for OptionMenu

Postby Nash » Sat May 11, 2019 8:00 pm



Putting it at the top isn't a bad choice, IMO.
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Hints for OptionMenu

Postby Graf Zahl » Sun May 12, 2019 2:19 am

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
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Hints for OptionMenu

Postby m8f » Sun May 12, 2019 2:29 am

Noted. Please move this to Closed Feature Suggestions.
User avatar
m8f
the dreamer
 
 
 
Joined: 29 Dec 2017
Discord: m8f#0629
Github ID: mmaulwurff

Re: Hints for OptionMenu

Postby Gez » Sun May 12, 2019 5:27 am

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.
Gez
 
 
 
Joined: 06 Jul 2007

Re: Hints for OptionMenu

Postby Enjay » Sun May 12, 2019 5:36 am

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

Re: Hints for OptionMenu

Postby Kinsie » Wed May 15, 2019 5:08 am

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
Kinsie
A Concept Utterly Obsolete
 
Joined: 22 Oct 2004
Location: MAP33
Discord: Find Me...
Twitch ID: thekinsie

Re: Hints for OptionMenu

Postby Nash » Wed May 15, 2019 6:22 am

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)
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: Awario [RSS], MSN [Bot] and 1 guest