| 86 | } |
| 87 | |
| 88 | void 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 | |
| 108 | void TextAtlas::setString(std::string_view value) |
| 109 | { |
no test coverage detected