Small feature update + fix
I've updated the Truncated Text tool to v1.2 and made a few small changes:
Fixes
- Fixed an issue where the truncated text wouldn't properly inherit a prefixed style.
Updates
- Put the code in its own namespace to avoid naming conflicts.
- Added a substitute property which defaults to True. When True, it will perform substitution on the provided string (i.e. it will substitute variables and perform other formatting tasks on the string). You almost always want this to be True, except in the rare case that you've already performed substitution on the string beforehand and don't want the displayable to perform substitution again.
- The specific use case that brought this about was that it's used for a chat system, which performs substitution on the messages ahead of time to prevent variable updates from changing past message contents. The truncate_text displayable is used to truncate the final message as a message preview in another part of the UI. To avoid double truncation, you can now set substitute False for this truncate_text displayable since the substitution already happened earlier.
- You'd really only run into this issue if you're using `[[` to cancel out square brackets, since substitution formats them into regular brackets, and then a second substitution round would get confused thinking they're variables
Do I need to update?
If you haven't had any problems with styling the truncate_text displayable, no. It was just an oversight of an edge case that likely won't affect all users and could be circumvented by directly setting style properties. That said, it is a bug that was fixed, so since you're here anyway, do go ahead and update! Plus you may find it helpful that the tool now has its own namespace, so you won't run into naming conflicts in the future, and perhaps you'll find the substitute property helpful too.
And that's all! I hope you've found the tool helpful ✨ You can find me on Bluesky or my website for more updates and coding tips 🔥
Files
Get Truncated Text for Ren'Py
Truncated Text for Ren'Py
Shrink or shorten text that doesn't fit its container for popups or other UI elements.
Status | Released |
Category | Assets |
Author | Feniks |
Genre | Visual Novel |
Tags | Graphical User Interface (GUI), Kinetic Novel, No AI, Ren'Py, User Interface (UI) |
More posts
- So I got my scope shovel out againMay 29, 2025
Leave a comment
Log in with itch.io to leave a comment.