mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-26 17:36:05 -05:00
reset child z order when applying layouts
This commit is contained in:
parent
9c9706b456
commit
3fb8c2be83
1 changed files with 2 additions and 0 deletions
|
@ -37,6 +37,7 @@ static void switchToMenu(CCNode* node, CCMenu* menu) {
|
|||
|
||||
node->retain();
|
||||
node->removeFromParent();
|
||||
node->setZOrder(0);
|
||||
|
||||
menu->addChild(node);
|
||||
node->setPosition(menu->convertToNodeSpace(worldPos));
|
||||
|
@ -67,6 +68,7 @@ static CCMenu* detachAndCreateMenu(CCNode* parent, const char* menuID, Layout* l
|
|||
parent->addChild(newMenu);
|
||||
|
||||
first->setPosition(0, 0);
|
||||
first->setZOrder(0);
|
||||
newMenu->addChild(first);
|
||||
first->release();
|
||||
|
||||
|
|
Loading…
Reference in a new issue