Skip to content

player-info-overlay scale playername text size (clamp min and max) by icon pressure #4863

Description

@JB940

Is your feature request related to a problem? Please describe.
The player-info-overlay at the top of the screen had issues with extremely large names.
Either the Alliance text would fall out of bounds and be cut off, or the name would multi-line wrap, causing the top bar to balloon to 4 and sometimes 5 lines worst-case, if a person had crown, was nuking, embargo'd, allied, and betrayed.

Describe the solution you'd like
Making the name monospace allows us to scale the font-size based on pressure of the icons. All names will be text-lg until the icons and alliance/betrayal puts spacial pressure, in which case the font-size gets reduced. If and only if the min font-size is reached through clamping, should the text start wrapping.

Describe alternatives you've considered
To change the sizes of icons, or of the dynamic alliance/betrayal text. To make other elements scale. Since some are pictures, some are icons etc. this is extremely messy and they get too small to clearly see what they are. Since the issue is the player name length, for clarity sake the icons take priority over a name. Their status is more relevant.

Additional context
https://discord.com/channels/1359946986937258015/1360078040222142564/1533915781975245090
brought up by wonder.

I am pushing this to a branch on repo before creating a PR so it can be checked.

Please check this album for all tests I've done:
https://imgur.com/a/20xfHFO

Assignment

  • I'd like to be assigned to this issue and work on it myself

Metadata

Metadata

Assignees

Labels

approvedApproved for a PR, if you assigned to the issue.

Type

No type

Projects

Status
Complete

Relationships

None yet

Development

No branches or pull requests

Issue actions