mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-30 03:15:38 -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->retain();
|
||||||
node->removeFromParent();
|
node->removeFromParent();
|
||||||
|
node->setZOrder(0);
|
||||||
|
|
||||||
menu->addChild(node);
|
menu->addChild(node);
|
||||||
node->setPosition(menu->convertToNodeSpace(worldPos));
|
node->setPosition(menu->convertToNodeSpace(worldPos));
|
||||||
|
@ -67,6 +68,7 @@ static CCMenu* detachAndCreateMenu(CCNode* parent, const char* menuID, Layout* l
|
||||||
parent->addChild(newMenu);
|
parent->addChild(newMenu);
|
||||||
|
|
||||||
first->setPosition(0, 0);
|
first->setPosition(0, 0);
|
||||||
|
first->setZOrder(0);
|
||||||
newMenu->addChild(first);
|
newMenu->addChild(first);
|
||||||
first->release();
|
first->release();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue