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

Method setProperty

core/ui/UITextAtlas.cpp:88–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88void TextAtlas::setProperty(std::string_view stringValue,
89 std::string_view charMapFile,
90 int itemWidth,
91 int itemHeight,
92 std::string_view startCharMap)
93{
94 _stringValue = stringValue;
95 _charMapFileName = charMapFile;
96 _itemWidth = itemWidth;
97 _itemHeight = itemHeight;
98 _startCharMap = startCharMap;
99
100 _labelAtlasRenderer->setCharMap(_charMapFileName, _itemWidth, _itemHeight, (int)(_startCharMap[0]));
101 _labelAtlasRenderer->setString(stringValue);
102
103 updateContentSizeWithTextureSize(_labelAtlasRenderer->getContentSize());
104 _labelAtlasRendererAdaptDirty = true;
105 // AXLOGD("cs w {}, h {}", _contentSize.width, _contentSize.height);
106}
107
108void TextAtlas::setString(std::string_view value)
109{

Calls 3

setCharMapMethod · 0.80
setStringMethod · 0.45
getContentSizeMethod · 0.45

Tested by

no test coverage detected