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

Function _createLabel

core/ui/UITextFieldEx.cpp:37–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35#endif
36
37static Label* _createLabel(std::string_view text,
38 std::string_view font,
39 float fontSize,
40 const Vec2& dimensions = Vec2::ZERO,
41 TextHAlignment hAlignment = TextHAlignment::LEFT,
42 TextVAlignment vAlignment = TextVAlignment::TOP)
43{
44 if (FileUtils::getInstance()->isFileExist(font))
45 {
46 return Label::createWithTTF(text, font, fontSize, dimensions, hAlignment, vAlignment);
47 }
48 else
49 {
50 return Label::createWithSystemFont(text, font, fontSize, dimensions, hAlignment, vAlignment);
51 }
52}
53
54static bool _checkVisibility(Node* theNode)
55{

Callers 2

internalCalcStringWidthFunction · 0.85
initWithPlaceHolderMethod · 0.85

Calls 2

getInstanceFunction · 0.85
isFileExistMethod · 0.45

Tested by

no test coverage detected