Yeah, it's a bug. SpriteSheet extends Image, which IMO is kinda poor design, but some things were forgotten like setAlpha, setRotation, etc. Added it to the TODO list...
Since each sprite in a sheet is its own Image class, you can apply individual alphas to each via getSubImage(cx, cy).setAlpha. However, I'd recommend learning to apply alpha manually, as setAlpha
may become deprecated in future versions of Slick.
Code:
init...
myFilter = new Color(1f, 1f, 1f, 0.5f); //50%
myFilter2 = new Color(1f, 1f, 1f, 0.25f); //25%
render...
//simple draw
sheet.getSubImage(cx, cy).draw(x, y, myFilter);
//embedded draw, more efficient
sheet.startUse();
//draw sprites with 50% alpha
graphics.setColor(myFilter);
sheet.getSubImage(cx, cy).drawEmbedded(x1, y1, w, h);
sheet.getSubImage(cx2, cy2).drawEmbedded(x2, y2, w, h);
//draw sprites with 25% alpha
graphics.setColor(myFilter2);
sheet.getSubImage(cx2, cy2).drawEmbedded(x3, y3, w, h);
sheet.getSubImage(cx2, cy2).drawEmbedded(x4, y4, w, h);
sheet.endUse();