LuaRendering::draw_icon()
Posted: Wed Mar 05, 2025 12:09 pm
It would be nice if you could draw alt-mode like icons with luarendering, LuaRendering::draw_sprite() exists but it is insufficient, it cannot:
- draw those sdf/shadow things neatly around icons like alt mode would
- draw quality (tbh just add another draw_sprite() for that, but this request is aimed for the shadow effect, but if we get that this would be nice too)
So i would like a way to request that with luarendering we can get those outlines/shadows so we can draw realistic looking alt-mode's ourselves,
currently we modders are limited to shadow sprites or drawing the icon in black a little bigger, like the factorissimo and ltn thought bubble mod:
This can be made to resemble a somewhat familiar look but it is still very far off in lots of subtle ways.
Therefore the MVP of this request is being able to draw the outline/background/sdf for items/fluids/signals/etc icons, things that never render as alt mode icons anyways can safely be ignored/excluded.
A more advanced version would be similar to https://lua-api.factorio.com/latest/pro ... cification or https://lua-api.factorio.com/latest/typ ... oning.html where you can specify one (or more) items/fluids/signals/etc and have the luarenderer take care of their size/spacing/positioning based on the parameters provided and/or the target entity.
A built-in quality draw option would be welcome too if something icon specific is being added anyways, but unlike the above it already has workarounds.
- draw those sdf/shadow things neatly around icons like alt mode would
- draw quality (tbh just add another draw_sprite() for that, but this request is aimed for the shadow effect, but if we get that this would be nice too)
So i would like a way to request that with luarendering we can get those outlines/shadows so we can draw realistic looking alt-mode's ourselves,
currently we modders are limited to shadow sprites or drawing the icon in black a little bigger, like the factorissimo and ltn thought bubble mod:
This can be made to resemble a somewhat familiar look but it is still very far off in lots of subtle ways.
Therefore the MVP of this request is being able to draw the outline/background/sdf for items/fluids/signals/etc icons, things that never render as alt mode icons anyways can safely be ignored/excluded.
A more advanced version would be similar to https://lua-api.factorio.com/latest/pro ... cification or https://lua-api.factorio.com/latest/typ ... oning.html where you can specify one (or more) items/fluids/signals/etc and have the luarenderer take care of their size/spacing/positioning based on the parameters provided and/or the target entity.
A built-in quality draw option would be welcome too if something icon specific is being added anyways, but unlike the above it already has workarounds.