Page MenuHomeWildfire Games

Small fix text align and falsely tooltip in gamesetup
Needs RevisionPublic

Authored by nwtour on Mar 24 2021, 12:56 PM.

Details

Reviewers
wraitii
marder
Summary

For mixed maps (random/fixed fractions), the alignment difference is noticeable
The game mistakenly offers to select a faction for a fixed value

The patch removes the "tooltip on the text" - did not find the application of this tooltip on the page

Test Plan

.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

nwtour requested review of this revision.Mar 24 2021, 12:56 PM
nwtour created this revision.
Stan set the repository for this revision to rP 0 A.D. Public Repository.
wraitii requested changes to this revision.Mar 26 2021, 4:12 PM

(Do we still have mixed maps in the current gamesetup iteration?)

The patch removes the "tooltip on the text" - did not find the application of this tooltip on the page

It's there if you load up a scenario map -> you'll see you no longer have a tooltip with the patch if you hover the value, only the text.
I don't think this should be changed, rather you probably should change the Civ tooltip if the civ is fixed.

This revision now requires changes to proceed.Mar 26 2021, 4:12 PM

(Do we still have mixed maps in the current gamesetup iteration?)

No. This is a custom map. Everywhere 0ad is positioned not only as a game but also as a means for creativity (mapmaking/modding)
Moreover, I did not understand the design idea - why for a random on the left and for a fixed in the center

It's there if you load up a scenario map -> you'll see you no longer have a tooltip with the patch if you hover the value, only the text.
I don't think this should be changed, rather you probably should change the Civ tooltip if the civ is fixed.

Ok. My mistake

No. This is a custom map. Everywhere 0ad is positioned not only as a game but also as a means for creativity (mapmaking/modding)
Moreover, I did not understand the design idea - why for a random on the left and for a fixed in the center

Sure, I was just wondering & I also wasn't sure if this would work right now - definitely something we want to support IMO.

nwtour updated this revision to Diff 16803.Mar 28 2021, 3:30 PM

align to "left"
update tooltip after rendering
fill tooltip with civilisation info

definitely something we want to support IMO.

Couldn't find a description for the term "IMO"....
Updated the patch - instead of removing tooltip, update the tooltip during rendering

Couldn't find a description for the term "IMO"....

"In my opinion". I tend to use too many acronyms, sorry.

I think the civ description is a good idea, see inline.

binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/PerPlayer/Dropdowns/PlayerCiv.js
33

Wouldn't it be easier to just call setTooltip directly here?

I tested it - a bad way. For dropdowns, the "random" tooltip filled with wrong value...

nwtour updated this revision to Diff 16804.Mar 28 2021, 4:05 PM

setTooltip directly
it fixed wrong tooltip for "random" dropdown entity

nwtour marked an inline comment as done.Mar 28 2021, 4:05 PM

looks sane on a first glance.

marder accepted this revision.May 25 2022, 7:41 AM

works as described, The code looks fine and I didn't notice any problems when testing.

I'm ok with keeping everything left-aligned.

Stan added a comment.May 25 2022, 3:18 PM

Is the tooltip change okay @marder? If yes, you can commit it :)

yes the tooltip change looks fine. I will test it one more time and commit it if I can't find any bugs.

marder requested changes to this revision.May 27 2022, 11:53 AM

hm actually, the tool tip change doesn't work perfectly.
If one selects a scenario map first but then switches to a random map, the tooltips still show the information for the civs from the scenario map, instead of "Choose the civilization for the player". It would need to be updated on change.

Also, while at it we should unify the tooltip style.

binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/PerPlayer/PlayersPanel.xml
47

tooltip_style="onscreenToolTip" to make it consistent

This revision now requires changes to proceed.May 27 2022, 11:53 AM