First of all - thanks! I really love this mod! I waited for such mod to appear for many years and even started making it myself but than abandoned it.
Factorio text fields and text render in GUI support rich text out of box.
But LuaRendering.draw_text - seem to not support it.
Example: write "Foo bar [recipe=iron-plate]" - in text box of a connection pole, and see what happens...
The suggestion/solution:
When rendering text for io ports add code to find and remove parts enclosed with square braces.
Here is code snippet:
function removeSquareBraces(s)
return s:gsub("%[.-]", "")
end
Longer explanation:
- Your textfields already work fine with this
- Your top left gui already shows all this correctly
- The only problem is labels on CC. Before rendering them - remove all text in square braces. And thats it, you are done.