Setting image in a button_style
Posted: Tue Apr 19, 2016 4:52 pm
In a button_style with slot_button_style as the parent, how do I set an image that appears inside the button when defining the style (it doesn't need to be done from control.lua, it can be done when setting up the styles)?
Same deal with button_style as a parent, actually.
Things I've tried:
Monoliths, entity-specific styles are all undocumented so I've been wild guessing from examples.
There's these "composition" things too but I don't know what they are and no info about them exists.
Alternatively if anybody knows of a mod with graphical buttons that still have their borders and hover effects, please direct me towards it so I can look at it as an example. That works too.
Same deal with button_style as a parent, actually.
Things I've tried:
- Setting the image in the *_graphical_set's monoliths. But this destroys the borders and backgrounds (which are a graphic).
- Setting the image in the *_background pictures. But these are ignored for these styles (I guess *_graphical_set overrides them? It's all undocumented so I don't know.)
- Making my own graphics with the icon and the button borders in them. But this is not acceptable in this case. I need to use game icon graphics, and lots of them. I can't redo the entire graphic set (not to mention keeping it up to date with any graphics changes in game updates).
Monoliths, entity-specific styles are all undocumented so I've been wild guessing from examples.
There's these "composition" things too but I don't know what they are and no info about them exists.
Alternatively if anybody knows of a mod with graphical buttons that still have their borders and hover effects, please direct me towards it so I can look at it as an example. That works too.