diff --git a/cocos/2d/CCLabelTTF.cpp b/cocos/2d/CCLabelTTF.cpp index 0ad1cb1cb3..3636a84a74 100644 --- a/cocos/2d/CCLabelTTF.cpp +++ b/cocos/2d/CCLabelTTF.cpp @@ -161,7 +161,7 @@ int LabelTTF::getFontSize() const return _renderLabel->getFontSize(); } -void LabelTTF::setFontSize(int fontSize) +void LabelTTF::setFontSize(float fontSize) { _renderLabel->setFontSize(fontSize); _contentDirty = true; diff --git a/cocos/2d/CCLabelTTF.h b/cocos/2d/CCLabelTTF.h index 45bed7196e..f70268eb59 100644 --- a/cocos/2d/CCLabelTTF.h +++ b/cocos/2d/CCLabelTTF.h @@ -131,7 +131,7 @@ public: void setDimensions(const Size &dim); int getFontSize() const; - void setFontSize(int fontSize); + void setFontSize(float fontSize); const std::string& getFontName() const; void setFontName(const std::string& fontName);