I second this–TextBoxes are one of the most neglected UI elements to date. We’ve been needing MaxLength
, Type
(e.g. ‘number’), and Max/Min
properties for years, but are still forced to use expensive listeners for post-input modification. We also have no access to numeric keyboards on touchscreen devices.
Several questions:
- Will this "typewriter’ effect support typing from the left and not just typing from the center alignment?
- Where is the API? I want to learn more about this, because I’m new to utf8’s and all that funny stuff
- Does it support other methods of typewriter effects? Like fading characters, dropping characters, turning characters etc
And will this work properly with richtext? Because my typewriter types out stuff with the richtext prefixes, before the entire word is spelt, THEN it updates to the richtext version
That’s a good idea! I just made a feature request for it:
Finally a feature I really could use. Looking forward to test it in the field. :3
Can this be done in reverse? So the characters start disappearing left to right.
I guess you could modify my typewriter for that same effect with RichText. Though it’s extremely unlikely Roblox will implement that feature as it’s such a specific case. utf8.graphemes does give you each character anyway so you can still use it for those special transitions though.
Can you explain to me why this is better than using this:
local function removeTags(str)
return (str:gsub("%b<>",""))
end
To me it seems that it’s easier to remove all tags with a single gsub method. However, I’m no expert on string manipulation, so there may be something I’m missing. Is there any additional benefit to using your way rather than mine?
EDIT:
After running some benchmark test by running the same string through both functions 5 million times, I got the average execution time for each method.
Method #1: 2.1190112975196 – Original method
Method #2: 0.48316200119676 – My method
This means that Method #2 is about 4x faster than Method#1.
How do you manually calculate textwrapping?
Does this mean if I have an NPC named “Christian” and another NPC called on them, Christian’s name would get replaced with “#########”?
This is a very useful update, but with the glitches in the text filter, I am not certain that important dialogue would not be inappropriately censored.
How do devs even make that “falling” effect? Do you make individual text labels and tween them?
cool! I think this update was necessary for many people!
It means “Christian” is sent to text filter instead of “C”, “Ch”, “Chr”, Chri" etc…
ADDITIONAL NOTE: we have different systems for filtering chat and static game text. You don’t have to worry about things like names and numbers if your text is static, this is just for any text that is from user input.
It is fine to remove the tag with what you provided too, but just to remember to always replace br tags with line return character if you want to count grapheme correctly in this case.
And there are actually more complicated cases like the following:
<<sometag>text</>
would render as what it is. While using existing quick tag-removal string gsub functions it will not return the correct display text. We tried to ship a readonly property to help with getting display text, but with a bad naming of Content
, we have to revert it for resolving regression issues. We will rename it and try to ship that again soon.
Thanks for the feedback. We’re actively working on improving TextBox and we like this idea. I have included this on our to do list along with other improvements. Cheers.
This is great! It takes forever to program a working Typewriter effect kind of thing, so glad it’s here!
I know this is off-topic, but that is some amazing GUI design.
I wish I was good at something other than programming
I’ve been using strings to make text occur. It works well but hopefully, this will improve my scripts quite a bit.
Wait quick question, will RichText be supported?
yes, it should be support the rich text. but if you are using rich text module, it’s not supported
This is incredible! Thanks so much! Now we don’t have to use the old tactic;
dialogueLabel.Text = "H"
wait(0.25)
dialogueLabel.Text = "He"
wait(0.25)
dialogueLabel.Text = "Hey"
Thanks for the huge update you’ve been bringing up for us, developers to work on their game smoothly and non-rushed.