Added Sprite::SetSize(float, float) overload
Former-commit-id: 672a2e4f5c2a2d40b4af42c7ee4b7b37d3774117
This commit is contained in:
parent
42b28e732c
commit
a51cbc1e49
|
|
@ -32,6 +32,7 @@ class NAZARA_API NzSprite : public NzSceneNode
|
||||||
|
|
||||||
void SetMaterial(NzMaterial* material, bool resizeSprite = true);
|
void SetMaterial(NzMaterial* material, bool resizeSprite = true);
|
||||||
void SetSize(const NzVector2f& size);
|
void SetSize(const NzVector2f& size);
|
||||||
|
void SetSize(float sizeX, float sizeY);
|
||||||
void SetTexture(NzTexture* texture, bool resizeSprite = true);
|
void SetTexture(NzTexture* texture, bool resizeSprite = true);
|
||||||
void SetTextureCoords(const NzRectf& coords);
|
void SetTextureCoords(const NzRectf& coords);
|
||||||
void SetTextureRect(const NzRectui& rect);
|
void SetTextureRect(const NzRectui& rect);
|
||||||
|
|
|
||||||
|
|
@ -109,10 +109,17 @@ void NzSprite::SetMaterial(NzMaterial* material, bool resizeSprite)
|
||||||
void NzSprite::SetSize(const NzVector2f& size)
|
void NzSprite::SetSize(const NzVector2f& size)
|
||||||
{
|
{
|
||||||
m_size = size;
|
m_size = size;
|
||||||
|
|
||||||
|
// On invalide la bounding box
|
||||||
m_boundingVolume.MakeNull();
|
m_boundingVolume.MakeNull();
|
||||||
m_boundingVolumeUpdated = false;
|
m_boundingVolumeUpdated = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NzSprite::SetSize(float sizeX, float sizeY)
|
||||||
|
{
|
||||||
|
SetSize(NzVector2f(sizeX, sizeY));
|
||||||
|
}
|
||||||
|
|
||||||
void NzSprite::SetTexture(NzTexture* texture, bool resizeSprite)
|
void NzSprite::SetTexture(NzTexture* texture, bool resizeSprite)
|
||||||
{
|
{
|
||||||
std::unique_ptr<NzMaterial> material(new NzMaterial);
|
std::unique_ptr<NzMaterial> material(new NzMaterial);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue