How would you go at blocking a text edit past a certain line.
It feels like Godot would have a quick function to do that because it recognize when a TextEdit node needs a scrollbar or not, but I haven't found an easy solution.
I had implemented a character limit, but it creates an issue if the players Tabs a bunch or use the return key. What I basically want is to have the textfield to release focus when the text would need a scrollbar.
My solution for now was to detect when the Caret was too far and then release the focus, but it does not work if the player move the caret in the text edit. I could do the same thing if would find the position of the last letter in the text edit and that would work, but I don't know how you would find the position of that letter, and it seems there should be an easier way to do that.
You don't have to give me a complete answer, I just need an idea of where to look or what function I could use to help me there.
Thank you!
Posted Nov 2, 2023, 1:31 AM UTC