0
CCSprite butonSprite=CCSprite.sprite("magnet.png");
    CCLabel label1=CCLabel.makeLabel("START", "Arial", 30);
    label1.setPosition(0,0);
    butonSprite.addChild(label1);

    ccMacros.CCLOG("", ""+butonSprite.getChildren());

    CCMenuItemSprite item=CCMenuItemSprite.item(butonSprite, butonSprite,this,"goToGameScreen");
    CCMenu menu=CCMenu.menu(item);

只有精灵是可见的。如何使标签可见?我尝试将位置设置为标签。

4

1 回答 1

0

Your label may be is beneath the position of the sprite, try to change the z-ordering greater than z-ordering of the sprite

e.g.

[sprite addChild:label z: 10];

于 2011-12-09T10:14:31.717 回答