Repository navigation
Limit visible characters in item names to 56 per line, up to 72 in total - #104
Draft
FiltersBy-Erazure wants to merge 1 commit into
Draft
FiltersBy-Erazure wants to merge 1 commit into
FiltersBy-Erazure wants to merge 1 commit into
Conversation
TrimItemText limited a whole item name to 56 visible characters, so a multi-line name (unique name, base, a line of tags) was cut from the end of its top line while its widest line was much shorter. Each line now keeps the 56 limit (MAX_ITEM_NAME_LINE_SIZE), so labels are no wider than before, and a whole name may hold up to 72 (MAX_ITEM_NAME_TOTAL_SIZE). Names that fit today are unchanged, one-line names are cut as before, and shop items keep 512.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change:
TrimItemTextnow limits each line of an item name toMAX_ITEM_NAME_LINE_SIZE(56 visible characters per line) and the whole name toMAX_ITEM_NAME_TOTAL_SIZE(72 visible characters in total). The 128-character buffer cap inItem::ItemNamePatchis unchanged.Why: Loot filters build multi-line item names. For example, a unique item has an item name, a base item name, then a line of tags for variable rolls / corruptions. The current limit of 56 total characters truncates the top line of an item name, eating the item's name from the right side. Limiting characters per line keeps every label within today's maximum width while letting multi-line names avoid truncation.
Compatibility: One-line names are cut exactly as before. Any name that fits today is left as is, and keeping the per line character limit at 56 avoids excessively wide item name boxes.
Buffer: At 72 visible characters, about 17 color codes still fit in the 128-character name buffer. Beyond that, the existing cap cuts the name, as it does today with color-heavy names.