Blocking Layer - Cocos2d-x

Cocos2d-x v3
  • pabitrapadhy
    Likes 0

    Problem Description

    Hello Developers,

    I want to know about blocking layers.
    Say, I have multiple layers in my game one coming on top of another, then if I am creating a layer,
    it will not take touch or MenuItemImage touch or UI touches, everything below the layer will be deactive to touch and reactivated again once the blocking layer is destroyed.

    I am sure there’s a way to do this, any suggestions from your side ?

    Thanks in advance.

  • Sonar Systems admin
    Likes 0

    Does the layer have alpha?

  • pabitrapadhy
    Likes 0

    yes, it does.

    or else I would have implemented pushScene.

  • Sonar Systems admin
    Likes 0

    try layer->setTouch(false);

Login to reply