Skip to content

unlimited mission titles#7448

Open
Goober5000 wants to merge 1 commit into
scp-fs2open:masterfrom
Goober5000:feature/unlimited_title
Open

unlimited mission titles#7448
Goober5000 wants to merge 1 commit into
scp-fs2open:masterfrom
Goober5000:feature/unlimited_title

Conversation

@Goober5000
Copy link
Copy Markdown
Contributor

Some code refactoring to allow mission titles to be strings of any length. Titles that are too long to actually display (based on string width) will be visibly truncated using font::force_fit_string, but the underlying title will not be affected. Multiplayer is still subject to the 31-character length limit, so titles sent over the network will still have characters truncated.

Also removes some redundant calls to gr_get_string_size, since font::force_fit_string returns the fitted string width.

@Goober5000 Goober5000 requested a review from z64555 as a code owner May 10, 2026 20:11
@Goober5000 Goober5000 added the enhancement A new feature or upgrade of an existing feature to add additional functionality. label May 10, 2026
@Goober5000 Goober5000 force-pushed the feature/unlimited_title branch from aae26a1 to c266a00 Compare May 10, 2026 20:55
Some code refactoring to allow mission titles to be strings of any length.  Titles that are too long to actually display (based on string width) will be visibly truncated using `font::force_fit_string`, but the underlying title will not be affected.  Multiplayer is still subject to the 31-character length limit, so titles sent over the network will still have characters truncated.

Also removes some redundant calls to `gr_get_string_size`, since `font::force_fit_string` returns the fitted string width.
@Goober5000 Goober5000 force-pushed the feature/unlimited_title branch from c266a00 to 2faac6d Compare May 10, 2026 21:47
@wookieejedi
Copy link
Copy Markdown
Member

Multiplayer is still subject to the 31-character length limit, so titles sent over the network will still have characters truncated. Could this run into the case, however rare, that two missions are sent and have different names but the differences are only in the end of the string, so after the truncation they end up getting sent with the same name?

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

Labels

enhancement A new feature or upgrade of an existing feature to add additional functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants