From b7173cd60d086217a930dd5e51c78769f7ce1a75 Mon Sep 17 00:00:00 2001 From: Michael Contento Date: Wed, 6 Nov 2013 14:42:31 +0100 Subject: [PATCH] add Sprite::setScale(float, float) --- cocos/2d/CCSprite.cpp | 6 ++++++ cocos/2d/CCSprite.h | 1 + 2 files changed, 7 insertions(+) diff --git a/cocos/2d/CCSprite.cpp b/cocos/2d/CCSprite.cpp index fa6f4878b0..63aa9fb5bb 100644 --- a/cocos/2d/CCSprite.cpp +++ b/cocos/2d/CCSprite.cpp @@ -840,6 +840,12 @@ void Sprite::setScale(float fScale) SET_DIRTY_RECURSIVELY(); } +void Sprite::setScale(float scaleX, float scaleY) +{ + Node::setScale(scaleX, scaleY); + SET_DIRTY_RECURSIVELY(); +} + void Sprite::setVertexZ(float fVertexZ) { Node::setVertexZ(fVertexZ); diff --git a/cocos/2d/CCSprite.h b/cocos/2d/CCSprite.h index 7ebf7ff616..0c0b652972 100644 --- a/cocos/2d/CCSprite.h +++ b/cocos/2d/CCSprite.h @@ -494,6 +494,7 @@ public: /// @name Functions inherited from Node virtual void setScaleX(float scaleX) override; virtual void setScaleY(float scaleY) override; + virtual void setScale(float scaleX, float scaleY) override; /** * @js NA * @lua NA