Void MenuScene: : initBG ()
{
Auto SPR=Sprite: : create (" menu/menu - bg. PNG ");
SPR - & gt; SetPosition (Point (Director: : getInstance () - & gt; GetWinSize (). The width/2, Director: : getInstance () - & gt; GetWinSize (). The height/2));
This - & gt; AddChild (SPR);
}
Check the automatic window found the following problems
How do I solve
CodePudding user response:
SPR null, create failure, certainly is picture does not exist or file name to write wrongCodePudding user response:
Is if the errors in the code, and its problems and explain the upstairs, the address corresponding to the image does not exist, make sure that your resources, the path to the right, I guess your address is missing a "res/"