I am making a game which has a drop down menu in it. And so I want the menu to have a background image to it as it is transparent for now.
//CCSMenu stethMenu
stethMenu->alignItemsInColumns(2,2,2);
stethMenu->setPosition(winsize.width/2,winsize.height/2);
stethMenu is the Menu that I want to have a background. I have the background image in a CCSprite. I tried to make the sprite a child of stethMenu but that did not work gave an exception.
One method from the top of my head is to make the sprite a separate child of the current Layer and set its position to the same as menu. I was hoping for a better way of doing it, so that I do not have to set the position of sprite same as the menu every time its position changes.