Compact circuits


Miniaturize a whole logic network into a single entity to save place (similar to factorissimo but for signals).

Content
a month ago
1.1
7.42K
Circuit network

g Feature: Richtext support - super simple - 5 minutes max!

9 months ago

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.

8 months ago

I just need to add missing use_rich_test in draw_text. Will be done in the next release.

New response