WidgetReader 212行 的解析器
std::string WidgetReader::getResourcePath(CocoLoader *pCocoLoader,
stExpCocoNode *pCocoNode,
cocos2d::ui::TextureResType texType)
{
stExpCocoNode *backGroundChildren = pCocoNode->GetChildArray();
std::string backgroundValue = backGroundChildren.GetValue();
if (backgroundValue.size()
< 3) {
return “”;
}
std::string binaryPath = GUIReader::shareReader()->getFilePath();
标红的语句 是v3分支上https://github.com/cocos2d/cocos2d-x/commit/b8950187650530611995f10457caf1a5456d3c39#diff-3c8384c505310cb94b25a8e868b59d35
这个版本添加的 。。 会导致button的disable图像无法读取,同时导致没有 click图像的button click后不见了、、 (以为自己load了click贴图)
我修改成了
if (backgroundValue == “null” ) {
return “”;
}
解决了问题
现在弱弱问下 为什么会有这个判定,会不会影响原来解析器的代码 还是只是不小心的一个bug