FAForever / fa

Lua code for FAF
221 stars 228 forks source link

Rework UnitsTooltip to use Layouter to fix its UI scaling #6175

Closed lL1l1 closed 1 month ago

lL1l1 commented 1 month ago

Description of the proposed changes

Fixes #5424 by rewriting unit tooltips using the Layouter. In addition, fixes localized empty strings appearing as empty parentheses in unit names (for example UEF mex in RU/US were "T3 Mass Exctractor ()"), and changes the buildtime display to just buildtime ticks instead of a convoluted MM:SS format. 100%: image 80%: image 150%: image

Testing done on the proposed changes

Go to options -> interface -> UI Scale -> 150% and then open a skirmish -> options -> restrictions and mouse over the units in a circle to make sure all 4 variants of the tooltip work as expected (variants that move which corner of the tooltip is attached as to avoid going off the screen). Repeat for 80% and 100% scale.

Checklist