mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
[sprite] don't set default rect before the user provided one
This commit is contained in:
parent
808adedf13
commit
aa81cae6cf
@ -46,7 +46,7 @@ Sprite::Sprite(const Texture& texture) :
|
|||||||
m_texture (NULL),
|
m_texture (NULL),
|
||||||
m_textureRect()
|
m_textureRect()
|
||||||
{
|
{
|
||||||
setTexture(texture);
|
setTexture(texture, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -55,8 +55,8 @@ Sprite::Sprite(const Texture& texture, const IntRect& rectangle) :
|
|||||||
m_texture (NULL),
|
m_texture (NULL),
|
||||||
m_textureRect()
|
m_textureRect()
|
||||||
{
|
{
|
||||||
setTexture(texture);
|
|
||||||
setTextureRect(rectangle);
|
setTextureRect(rectangle);
|
||||||
|
setTexture(texture, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user