3.0 正式版的坐标跟锚点逻辑跟 rc0 不一致,这个没说?
CCSGUIReader.cpp line:1114 行 , load cocostudio child节点,这样setPostion逻辑变了要转成父节点锚点无关的坐标,也不可能直接除个2 就完事了吧… ?太坑了,这也能叫stable版啊…
if (!dynamic_cast<Layout*>(widget))
{
if (child->getPositionType() == cocos2d::ui::POSITION_PERCENT)
{
child->setPositionPercent(Point(child->getPositionPercent().x + 0.5f, child->getPositionPercent().y + 0.5f));
}
child->setPosition(Point(child->getPositionX() + widget->getSize().width / 2.0f, child->getPositionY() + widget->getSize().height / 2.0f));
}
widget->addChild(child);

