Hints for OptionMenu
Moderator: GZDoom Developers
-
-
- 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
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
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.
-
-
- Posts: 17465
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: Hints for OptionMenu
Care to post a video or animated GIF of how this looks like?
-
-
- 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
Found out that hints need a bit more work to reliably behave in some corner cases. Fixes are coming soon.
Edit: pushed the fixes.
-
-
- Posts: 17465
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: Hints for OptionMenu
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.
-
-
- 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
Yes, Hint takes a line of the menu.
-
-
- Posts: 26571
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: Hints for OptionMenu
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.
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.
-
-
- Posts: 17934
- Joined: Fri Jul 06, 2007 3:22 pm
Re: Hints for OptionMenu
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...
-
-
- 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
Of course it can. It's in the development version of one of my mods already, and will gradually creep into others.Enjay wrote:is it not just something that can be adopted as a mod-specific feature?
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.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.
Also, the existence of localisation translations shouldn't stop the addition of new strings to the engine in general.
This method of putting description has an issue if it's used with the current option menu implementation: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.
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.
Yes, this is a valid option, but the difference is the visual clutter. Compare: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...
Using the different color for descriptions helps, but not much:
-
-
- Posts: 17465
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
-
- Lead GZDoom+Raze Developer
- Posts: 49183
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Hints for OptionMenu
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.)
-
-
- 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
Noted. Please move this to Closed Feature Suggestions.
-
-
- Posts: 17934
- Joined: Fri Jul 06, 2007 3:22 pm
Re: Hints for OptionMenu
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.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).
-
-
- Posts: 26571
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: Hints for OptionMenu
Of course not.m8f wrote:Also, the existence of localisation translations shouldn't stop the addition of new strings to the engine in general.
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.
-
- Posts: 7402
- Joined: Fri Oct 22, 2004 9:22 am
- Graphics Processor: nVidia with Vulkan support
- Location: MAP33
Re: Hints for OptionMenu
The latter is what I did to my alteration of Nash's tooltip code.Gez wrote: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.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).
-
-
- Posts: 17465
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: Hints for OptionMenu
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)