Page 1 of 1

Add sprite faded_percent to LuaGuiElement

Posted: Tue Aug 11, 2026 9:00 pm
by PennyJim
The engine uses faded (desaturated?) sprites for filter slots, there does not seem to be any way for us to do the same for our sprites or sprite-buttons.
If the engine enables/disables it instead of applying some percentage value, I don't mind if it's is_faded instead.

Even if my requests (135618, 135616) get implemented, that leaves me unable to make the 'empty' fluidbox properly showcase a filter. Maybe I could if I were to make a sprite prototype for every possible fluid, but being able to do it the same way the engine does it would be preferred.
Difference between engine (left) and mod (right)
Difference between engine (left) and mod (right)
08-11-2026, 14-57-06.png (5.9 KiB) Viewed 124 times

Re: Add sprite faded_percent to LuaGuiElement

Posted: Wed Aug 12, 2026 12:14 am
by Shemp
+1, I would like this for Buckets.

You can make the sprite kind of fade out by setting button.enabled = false, but this turns the background grey and doesn't play well with the "red_inventory_slot" style.

Re: Add sprite faded_percent to LuaGuiElement

Posted: Wed Aug 12, 2026 1:59 am
by protocol_1903
This might be caused by the sprite being rendered in front of the background red in the custom variation, as opposed to behind it in the crafter UI. If so, it might be nice to have a property in EmptySpriteInfo that specifies an "overlay color" or whether to render the usual red overlay when empty. I'd be using it for a similar case of crafting-like UI, where turning the 'unfulfilled' overlay on and off would be necessary.

Re: Add sprite faded_percent to LuaGuiElement

Posted: Wed Aug 12, 2026 6:49 pm
by Osmo
+1, some form of transparency would be useful