@1070500278 写道:
CheckBox* CheckBox::create(const std::string& backGround,
const std::string& cross,
TextureResType texType)
{
CheckBox *pWidget = new (std::nothrow) CheckBox;
if (pWidget && pWidget->init(backGround,
"",
cross,
"",
"",
texType))
{
pWidget->autorelease();
return pWidget;
}
CC_SAFE_DELETE(pWidget);
return nullptr;
}
pWidget->init中的第二个参数是 “”,当TextureResType是TextureResType::PLIST时setSpriteFrame会进入 CCASSERT(!spriteFrameName.empty(), "spriteFrameName must not be empty");
帖子: 1
参与者: 1