MCPcopy Create free account
hub / github.com/axmolengine/axmol / createWithBMFont

Method createWithBMFont

core/2d/Label.cpp:300–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298}
299
300Label* 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
320Label* Label::createWithBMFont(std::string_view bmfontPath,
321 std::string_view text,

Callers

nothing calls this directly

Calls 5

setMaxLineWidthMethod · 0.80
autoreleaseMethod · 0.80
RectClass · 0.70
setBMFontFilePathMethod · 0.45
setStringMethod · 0.45

Tested by

no test coverage detected