| 48 | } |
| 49 | |
| 50 | void ComplexSprite::setTexture(const sf::Texture& texture, bool resetRect) |
| 51 | { |
| 52 | if (resetRect || (!m_texture && (m_textureRect == sf::IntRect()))) |
| 53 | setTextureRect(sf::IntRect(0, 0, texture.getSize().x, texture.getSize().y)); |
| 54 | m_texture = &texture; |
| 55 | } |
| 56 | |
| 57 | void ComplexSprite::setTextureRect(const sf::IntRect& rectangle) |
| 58 | { |