So I'm used to the "old way" of coloring a black button to something else, it used to look something like this:
Code: Select all
style my_button:
idle_background Frame(im.MatrixColor("gui/button/button.webp", im.matrix.colorize(c_lightorange, c_white)), tile=False)
hover_background Frame(im.MatrixColor("gui/button/button.webp", im.matrix.colorize(c_orange, c_white)), tile=False)
selected_background Frame(im.MatrixColor("gui/button/button.webp", im.matrix.colorize(c_darkorange, c_white)), tile=False)
However, the current documentation says that using image manipulators should be abandoned:
However, I am not aware of a way to use a transform and a style together. How can I then change the code above to match the new pattern?
Warning
The use of image manipulators is historic. A number of image manipulators that had been documented in the past should no longer be used, as they suffer from inherent problems, and in general (except for im.Data()), the Transform() displayable provides similar functionality while fixing the problems.
Thank you!
(Before you ask, yes, I have many colored buttons in game, and no I don't want to have dozens of duplicate images in the GUI folder with different hues. )