1

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

Alex K
  • 5,092
  • 15
  • 50
  • 77
  • 1
    You're able to click through it because you didn't program it to disallow that. Graphics and input are independent from each other and have no knowledge of what the other is doing. I think you'll need to create lists of widgets you want to disable and set them to Touchable.disabled at the same time you display your cover. – Tenfour04 Mar 23 '15 at 19:54

0 Answers0