///////////////////////////////////////////////////////
| 49 | |
| 50 | //////////////////////////////////////////////////////////// |
| 51 | void Sprite::setTexture(const Texture& texture, bool resetRect) |
| 52 | { |
| 53 | // Recompute the texture area if requested |
| 54 | if (resetRect) |
| 55 | setTextureRect(IntRect({0, 0}, Vector2i(texture.getSize()))); |
| 56 | |
| 57 | // Assign the new texture |
| 58 | m_texture = &texture; |
| 59 | } |
| 60 | |
| 61 | |
| 62 | //////////////////////////////////////////////////////////// |