Code: Select all
rendering.draw_sprite{
sprite="virtual-signal.signal-black",
x_scale=1.4,
y_scale=1.4,
render_layer="entity-info-icon",
target=target,
target_offset={0,-0.5},
surface=target.surface,
only_in_alt_mode=true
}
rendering.draw_sprite{
sprite="entity."..contents,
x_scale=1,
y_scale=1,
render_layer="entity-info-icon",
target=target,
target_offset={0,-0.5},
surface=target.surface,
only_in_alt_mode=true
}
Edit: Here is an illustration. On the left is rendered icon with no background. Center is rendered with signal-black background as above. Right is the game-generated contents icon I would like to imitate.