[posila] [0.18.12] Style.draw_shadow_under_picture has no effect on custom GUI sprite buttons

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

[posila] [0.18.12] Style.draw_shadow_under_picture has no effect on custom GUI sprite buttons

Post by Deadlock989 »

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.

shadow1.png
shadow1.png (57.54 KiB) Viewed 2111 times
shadow2.png
shadow2.png (113.32 KiB) Viewed 2111 times

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:

shadow3.png
shadow3.png (71.5 KiB) Viewed 2111 times
shadow4.png
shadow4.png (99.53 KiB) Viewed 2111 times
Image

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [posila] [0.18.12] Style.draw_shadow_under_picture has no effect on custom GUI sprite buttons

Post by posila »

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.

User avatar
Deadlock989
Smart Inserter
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

Post by Deadlock989 »

Many thanks.
Image

Post Reply

Return to “Resolved Problems and Bugs”