-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added unified_inventory_enable_item_names
option
#235
Conversation
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
For clarification: is this fix only to work around long descriptions? If so, you could still preserve the name HUD but perform a string length check to then shorten the description to the first line and first (e.g.) 50 characters. EDIT: In case overlaps with other HUD elements are an issue, it might make sense (in regard to #135) to take other mods into account to place the item name element in a better position. |
This change is a small addition to the customization. Well, item names are sometimes useful, so I'll try to implement a fix for them as soon as possible. // It's not related to #135. |
Added: - Show only names settings: in case of multi-line descriptions, only the first line is shown - Shorten long descriptions: Removes all characters after x index, and add `[...]` - Max length before truncation: x for Shorten long descriptions Notes: - If Max length == 0, then item names won't be displayed
Contains bug: - minetest.strip_colors() does not removes `@default)`
FYI: Unfortunately I cannot find any helper function to strip translation marks. Not handling them might however cause visual errors or warnings on the client. |
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
Thanks. Works. Will merge in a few days unless there are objections. |
Added option to disable Item Names.
Purpose of change
This change allows players to disable item names, addressing the issue of long item descriptions taking up too much screen space in certain mods (e.g., ranged weapons).
Alternative solution
Show only first line of Item's description