How can I add the layout in middle screen? ...

  • Johan08
    Likes 0

    Problem Description

    I try with layout->setPosition(origin.x + visibleSize.width / 2, origin.y + visibleSize.height); . but this is added lower left corne

  • Sonar Systems admin
    Likes 0

    try changing the anchor point of the layout.

  • Johan08
    Likes 0

    I was trying, but it doesn’t works… I attached my code 

     

    https://github.com/Johan08/cocosSonarSystem
    

     

    Thanks!

     

  • Sonar Systems admin
    Likes 0

    Does anything change/happen?

  • Johan08
    Likes 0

    
    
    This does not change 
    
    
    
  • Sonar Systems admin
    Likes 0

    Try chaning the anchor point to 0, 0 and see if that changes anything.

Login to reply