Label* Label::createWithCharMap(const std::string& charMapFile, int itemWidth, int itemHeight, int startCharMap) { auto ret = new (std::nothrow) Label(); if (ret && ret->setCharMap(charMapFile,itemWidth,itemHeight,startCharMap)) { ret->autorelease(); return ret; } delete ret; return nullptr; }
Label* Label::createWithCharMap(Texture2D* texture, int itemWidth, int itemHeight, int startCharMap) { auto ret = new (std::nothrow) Label(); if (ret && ret->setCharMap(texture,itemWidth,itemHeight,startCharMap)) { ret->autorelease(); return ret; } delete ret; return nullptr; }
Label* Label::createWithCharMap(const std::string& plistFile) { auto ret = new (std::nothrow) Label(); if (ret && ret->setCharMap(plistFile)) { ret->autorelease(); return ret; } delete ret; return nullptr; }
Label* Label::createWithCharMap(Texture2D* texture, int itemWidth, int itemHeight, int startCharMap) { auto ret = new Label(); if (!ret) return nullptr; if (ret->setCharMap(texture,itemWidth,itemHeight,startCharMap)) { ret->autorelease(); return ret; } else { delete ret; return nullptr; } }
Label* Label::createWithCharMap(const std::string& plistFile) { auto ret = new Label(); if (!ret) return nullptr; if (ret->setCharMap(plistFile)) { ret->autorelease(); return ret; } else { delete ret; return nullptr; } }