Skip to content

Add custom text truncation support, and improve scoreboard legibility#7169

Open
Lightningbulb2 wants to merge 14 commits into
FAForever:developfrom
Lightningbulb2:feature/text-truncation
Open

Add custom text truncation support, and improve scoreboard legibility#7169
Lightningbulb2 wants to merge 14 commits into
FAForever:developfrom
Lightningbulb2:feature/text-truncation

Conversation

@Lightningbulb2

Copy link
Copy Markdown

Sorry, had to remake pull request to move it to a feature branch instead of my develop branch.

Original PR:
#7105

Description of the proposed changes

I wanted to improve scoreboard legibility.

I started by separating game speed, and game quality into their own controls to make modding and future changes easier. I added dropshadows, tooltips, and right aligned the ratings while making sure to crop player names if necessary. This led to the-

Implementation of SetTruncateText() which defaults to "..." but can have custom trailing strings like "/", "-", or even "ITDOESNTFIT" (for larger amounts of text where cropping bugs could be missed).

This is executed through SetClipToWidth() and only activates if SetTruncationEnabled(true) is set.

To do this cleanly, and in a reusable way, I split SetText() into SetText() and its implicitly called SetDisplayText().

SetText() - controls the source text and behaves practically the same as before

SetDisplayText() - sends text changes to the engine without changing the Text object's internal string. This allows for better mod and source code capabilities for fancier text. The first example being custom text truncation.

Testing done on the proposed changes

I loaded up private AI matches and replays to check for console and visual errors. I got screenshots:

Original for reference (plus rank cropping issue)
Original


Game start with lots of players
GameStartExample


Full scoreboard
NEWSCOREBOARD


Replay scoreboard
REPLAY


Show full player names after hovering for a moment (in-case of cropped names)
CROPPEDHOVER


Tooltips added for new players
gameQuality


gameSpeed

Checklist

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@Lightningbulb2, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 23 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 54439777-55e7-43e0-bb93-713d5e397f23

📥 Commits

Reviewing files that changed from the base of the PR and between 827ec16 and 2471fc6.

📒 Files selected for processing (6)
  • changelog/snippets/graphics.7169.md
  • loc/US/strings_db.lua
  • lua/maui/text.lua
  • lua/ui/game/layouts/score_mini.lua
  • lua/ui/game/score.lua
  • lua/ui/help/tooltips.lua
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant