Transparency overlapping in Java -


So I am making a simple break function in my game, and I have to have a gray transparent background, problem is, rectangle Keeps overlapping and only one fade out is visible. I've tried g2.dispose, and it works, but I can not draw anything else on it.

My render method, which is being called 60x seconds (I release that the rectangle is being drawn in 60x seconds)

  Public Zero Render (Graphics G) {Graphics2D g2 = (Graphics2D) G; G2.setColor (new color (0, 0, 0, 50)); G2.fillRect (0, 0, RPG.getWidth), RPG.getHeight ()); G2.drawImage (paused, 0, 0, empty); }  

Thanks!

EDIT: I feel like an idiot ... let me just under my INGEM Have to draw the screen!


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -