| 81 | } |
| 82 | |
| 83 | void ImageBox::setImageTexture(std::string_view _texture) |
| 84 | { |
| 85 | mCurrentTextureName = _texture; |
| 86 | mSizeTexture = texture_utility::getTextureSize(mCurrentTextureName); |
| 87 | |
| 88 | // если первый раз, то ставим во всю текстуру |
| 89 | if (mItems.empty()) |
| 90 | { |
| 91 | _setUVSet(FloatRect(0, 0, 1, 1)); |
| 92 | _setTextureName(mCurrentTextureName); |
| 93 | } |
| 94 | else |
| 95 | { |
| 96 | recalcIndexes(); |
| 97 | updateSelectIndex(mIndexSelect); |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | void ImageBox::recalcIndexes() |
| 102 | { |
no test coverage detected