[Never mind] LineEdit : special characters ?
I'm currently working on a 'save game' menu. I'm using a LineEdit node for user input (a short descriptive phrase that will later be shown in the 'load game' menu).
Problem : what if someone types something like this :
The user input is 'escaped' before it is written to file :
save_game_title.json_escape()
The problem is in displaying the text in the load menu screen :
Approach 1 : I don't really care what the user types
---> if I 'unescape' the text before display, it is interpretated (eg. \n becomes a newline character) :
---> if I display 'as is', it is still escaped (of course)
So, is there a way to just -display- the characters (without interpreting them, eg. convert \n into a newline) ?
Approach 2 : Of course, I could also limit input to Latin alphanumeric chars (regex) ... but I prefer not to if I can get the above working.
Any ideas ?
Answers
Update : I must have a gremlin in my computer.
This LineEdit thing has been bugging me for a week, and now, suddenly, without doing anything ... everything works as it should ?!
Those are the worst kind of bugs. Hope it doesn't come back.
If you are following best practices and using version control, you could perhaps check a diff to figure the difference out.
Unless it's a heisenbug...
And yes, I'm using git. But the code just couldn't be simpler.
Don't know what happened.
Programming, eh ?!