The style quick_bar_slot_button, defined in core/prototypes/style.lua, has the property draw_shadow_under_picture set to true. It results in a darker gradient around the sprite button's sprite, giving it a nice contrast, consistent with how items and recipes are rendered elsewhere in the game, e.g. tooltips. You can see this style in use currently on the quickbar, and the CTRL-F6 style browser confirms that the property has been set. From the screenshots in the most recent FFF, it looks like the upcoming character GUI is also making use of this property.
However, sprite buttons in custom GUIs which are given this style (or any custom-made style which uses the property) do not seem to get the same shadow treatment, despite the style browser confirming it is set:
[posila] [0.18.12] Style.draw_shadow_under_picture has no effect on custom GUI sprite buttons
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: [posila] [0.18.12] Style.draw_shadow_under_picture has no effect on custom GUI sprite buttons
Should be fixed for 0.18.13.
Note: This is probably not problem for you, but just in case ... the shadow uses signed distance field sprite, that is generated for icons on startup. It is currently not possible to configure other sprites to have SDF generated, so it is not possible to have "shadow" under non-icons.
Note: This is probably not problem for you, but just in case ... the shadow uses signed distance field sprite, that is generated for icons on startup. It is currently not possible to configure other sprites to have SDF generated, so it is not possible to have "shadow" under non-icons.
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm