| 298 | } |
| 299 | |
| 300 | Label* Label::createWithBMFont(std::string_view bmfontPath, |
| 301 | std::string_view text, |
| 302 | const TextHAlignment& hAlignment, |
| 303 | int maxLineWidth) |
| 304 | { |
| 305 | auto ret = new Label(hAlignment); |
| 306 | |
| 307 | if (ret->setBMFontFilePath(bmfontPath)) |
| 308 | { |
| 309 | ret->setMaxLineWidth(maxLineWidth); |
| 310 | ret->setString(text); |
| 311 | ret->autorelease(); |
| 312 | |
| 313 | return ret; |
| 314 | } |
| 315 | |
| 316 | delete ret; |
| 317 | return nullptr; |
| 318 | } |
| 319 | |
| 320 | Label* Label::createWithBMFont(std::string_view bmfontPath, |
| 321 | std::string_view text, |
nothing calls this directly
no test coverage detected