Delinitor wrote:
Ah, that looks like what I'm looking for! :D Could you possibly explain what it means?
Code:
Color colorAlpha = new Color(1f,1f,1f,0.5f);
Here you are creating a new color, which is white and is half transparent. The values that you pass to construct a new color are the red, green, blue, and alpha values of the color.
Code:
g.setColor(colorAlpha);
Here you are setting the color to use to draw graphics
Code:
g.fill(Shape)
Here you are filling a shape with the color you set earlier.
Do note though, that the color will be set for the rest of the draw calls, so you'll probably want to set the color back to solid white unless you want everything afterwards rendered at half opacity.