Sometimes (as in D2546) the different choices for a dropdown in the options page are not obvious to the player.
This patch aims to solve that by displaying a tooltip for every of the option choices.
Details
There are different ways this can be achieved. Some choices include:
- Displaying all per-item tooltips below the option tooltip when hovering the option.
- Displaying or not displaying the option tooltip when hovering an item.
Notice the 500ms tooltip delay is changed to 0ms, so that the user is immediately aware of the choices, and thus reading the tooltips even prior to the labels. (Once starting to read the labels, its easy to not pay attention to the tooltip, not expecting it to differ.)
and 'Make sure that it works.'
Notice / confirm that messages.json extracts the strings already.
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/1067/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/163/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 4. |----| | /zpool0/trunk/binaries/data/mods/public/gui/options/options.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/options/options.js | 119| 119| sprintf( | 120| 120| option.min !== undefined && option.max !== undefined ? | 121| 121| translateWithContext("option number", "Min: %(min)s, Max: %(max)s") : | 122| |- option.min !== undefined && option.max === undefined ? | | 122|+ option.min !== undefined && option.max === undefined ? | 123| 123| translateWithContext("option number", "Min: %(min)s") : | 124| 124| option.min === undefined && option.max !== undefined ? | 125| 125| translateWithContext("option number", "Max: %(max)s") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 6 tabs but found 5. |----| | /zpool0/trunk/binaries/data/mods/public/gui/options/options.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/options/options.js | 120| 120| option.min !== undefined && option.max !== undefined ? | 121| 121| translateWithContext("option number", "Min: %(min)s, Max: %(max)s") : | 122| 122| option.min !== undefined && option.max === undefined ? | 123| |- translateWithContext("option number", "Min: %(min)s") : | | 123|+ translateWithContext("option number", "Min: %(min)s") : | 124| 124| option.min === undefined && option.max !== undefined ? | 125| 125| translateWithContext("option number", "Max: %(max)s") : | 126| 126| "", | | [NORMAL] ESLintBear (indent): | | Expected indentation of 6 tabs but found 4. |----| | /zpool0/trunk/binaries/data/mods/public/gui/options/options.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/options/options.js | 121| 121| translateWithContext("option number", "Min: %(min)s, Max: %(max)s") : | 122| 122| option.min !== undefined && option.max === undefined ? | 123| 123| translateWithContext("option number", "Min: %(min)s") : | 124| |- option.min === undefined && option.max !== undefined ? | | 124|+ option.min === undefined && option.max !== undefined ? | 125| 125| translateWithContext("option number", "Max: %(max)s") : | 126| 126| "", | 127| 127| { | | [NORMAL] ESLintBear (indent): | | Expected indentation of 7 tabs but found 5. |----| | /zpool0/trunk/binaries/data/mods/public/gui/options/options.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/options/options.js | 122| 122| option.min !== undefined && option.max === undefined ? | 123| 123| translateWithContext("option number", "Min: %(min)s") : | 124| 124| option.min === undefined && option.max !== undefined ? | 125| |- translateWithContext("option number", "Max: %(max)s") : | | 125|+ translateWithContext("option number", "Max: %(max)s") : | 126| 126| "", | 127| 127| { | 128| 128| "min": option.min, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 7 tabs but found 5. |----| | /zpool0/trunk/binaries/data/mods/public/gui/options/options.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/options/options.js | 123| 123| translateWithContext("option number", "Min: %(min)s") : | 124| 124| option.min === undefined && option.max !== undefined ? | 125| 125| translateWithContext("option number", "Max: %(max)s") : | 126| |- "", | | 126|+ "", | 127| 127| { | 128| 128| "min": option.min, | 129| 129| "max": option.max binaries/data/mods/public/gui/options/options.js | 239| » » » let·value·=·optionType.guiToValue(control); | | [NORMAL] ESLintBear (no-shadow): | | 'value' is already declared in the upper scope. Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1585/display/redirect
(The patch was not tested, see IRC)
binaries/data/mods/public/gui/options/options.json | ||
---|---|---|
62 ↗ | (On Diff #11060) | Shouldnt be added to late observers, but the gamesetup assign option! |