I am working on a game where we would like the enemies to flash white when hit by a bullet. Ideally, we would like to use the same mechanism to render an Image in any colour. Our Images are all png files with transparent backgrounds and these transparent areas must exist in the coloured version of the Image.
Testing shows that Image.draw(x, y, filter) does not change the appearance of the image when given Color.white
Testing has also shown that Graphics.drawImage(Image, x, y, color) has no affect when color
is set to Color.white
Is there a way to change an Image to white using existing Slick2D functionality? Failing that, is there an easy way to use LWJGL to perform the colouring that can be easily incorporated into a Slick2D project?
NB Answers that allow an Image to be rendered in an arbitrary colour will be preferred over answers that are specific to Color.white