mt-mods / mail

Mail mod for Luanti
https://content.minetest.net/packages/mt-mods/mail/
Other
14 stars 23 forks source link

Use interleaved style #124

Closed Athozus closed 10 months ago

Athozus commented 10 months ago

As suggested in #120 by @nonfreegithub, I made a small script to generate interleaved style by putting > chars before each new line.

I'm making a pull request in case some features/details are requested, notably for formspec visualization, even if it's hard, if it's a well-demanded feature, then I can work on it.

Note that it uses a local function interleaveMsg(), because the code is shared for both replying (all)/forwarding.

I let you a screenshot anyway. screenshot_20231207_220431

nonfreegithub commented 10 months ago

nice!

Athozus commented 10 months ago

I was making a functional colorizer for interleaving (replacing > by grey shades) but minetest.colorize() doesn't work properly in text areas. It will be added when that will be fixed.

Then, I merge.

S-S-X commented 10 months ago

I was making a functional colorizer for interleaving (replacing > by grey shades) but minetest.colorize() doesn't work properly in text areas. It will be added when that will be fixed.

Remeber that this will add invisible control characters into message and while text areas can show colored text those are not handled very well within minetest text editor. You'd probably want to wait until you can update minimum minetest version for mod.conf to be at least what is latest well tested version where text editors work without flaws (like issues with selecting text and stepping over control characters with keyboard).

Then you'd want to force anyone still using older engine to update to new tested minetest version, so that might take bit more time than just minetest release wher this would get fixed.