forked from endless-sky/endless-sky
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Truncate displayed ship names to prevent overflowing containers (endl…
…ess-sky#2631) * Apply truncation to the front of ship names if selling more than one Avoids awkward-looking line wraps caused by long ship names when coupled with list-style confirmation dialog. Refs endless-sky#2249 * Extend truncation to other appearances of ship names Adds front or end truncation to the following locations: - Hailing screen: no overflow off right edge for combinations of long ship names and/or long government names. - Targeting reticle: no overflow off left edge of ship name - Ship detail screen: no overlap of "ship:" and the ship name - Shipyard/Outfitter ship details screen: no/minimal overflow out of rounded square border - Player Info fleet list: no overflow of ship name across category Front truncation used where possible, to preserve possible identifying numbers on the tail of the ship name, e.g. the "1" in 'My Ship 1' * Remove all overlap from Shipyard/Outfitter shared panel * Font::TruncateMiddle Allow truncation of strings from the middle out. No special handling to cut in "pretty" locations to do things such as prefer whole-word removal, 2nd-letter starting, etc. Changes in border characters from "..." to alphanumerics, plus the slightly reduced width precision of TruncateMiddle vs Truncate(Front) made adjusting some targeted widths necessary.
- Loading branch information
1 parent
e69d8e7
commit 9556f87
Showing
8 changed files
with
73 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters