openplanet-nl / issues

Issue tracker for Openplanet.
10 stars 0 forks source link

Maniaplanet-formatted strings in `UI::InputText` #505

Open ezio416 opened 3 weeks ago

ezio416 commented 3 weeks ago

It would be nice to have an option (maybe in the way of a flag) to allow displaying raw Maniaplanet-formatted strings (specifically with \\$ for Openplanet's parsing) in text input fields. Currently all format codes are applied, which makes it difficult to effectively allow the user to change them. Also, it seems the cursor position acts as though they are not being applied, which makes it be further along than it really should be (this raw string is "%Y-%m-%d \\$AAA@ \\$G%H:%M:%S \\$AAA(%a)" with no trailing spaces): Screenshot 2024-06-24 144745

A workaround I'm using is to have the user only use $ instead of \\$ and applying the \\ afterwards but I don't think this is ideal.