I created a transparent black layer using this code:
Pixmap pixmap = new Pixmap((int) stage.getWidth(), (int) stage.getHeight(), Pixmap.Format.LuminanceAlpha);
Pixmap.setBlending(Pixmap.Blending.None); // disable Blending
pixmap.setColor(0, 0, 0, 1f);
pixmap.fill();
pixmap.fillCircle(200, 200, 100);
pixmapTexture = new Texture(pixmap, Pixmap.Format.LuminanceAlpha, false);
@Override
public void render(float delta) {
super.render(delta);
stage.getBatch().begin();
stage.getBatch().draw(pixmapTexture, 0, 0);
stage.getBatch().end();
}
The problem that I can click through it. For example if I have a button behind it I can click it. I want to be able to click only specific actors that I will make for them a transparent circle in the black screen (texture) that I created.
Why I'm able to click through the texture? I want to be able to click only through a transparent circle that I will make.
P.S I'm trying to do something like this