From cffdb129c9c91c1b682d52921612f27a3fa9323c Mon Sep 17 00:00:00 2001 From: Dhilan007 Date: Mon, 31 Mar 2014 11:47:28 +0800 Subject: [PATCH] change type of Label::_shadowNode --- cocos/2d/CCLabel.cpp | 2 +- cocos/2d/CCLabel.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/2d/CCLabel.cpp b/cocos/2d/CCLabel.cpp index a96023ba08..614fec4b36 100644 --- a/cocos/2d/CCLabel.cpp +++ b/cocos/2d/CCLabel.cpp @@ -1084,7 +1084,7 @@ void Label::drawTextSprite(Renderer *renderer, bool parentTransformUpdated) if (_shadowEnabled && _shadowNode == nullptr) { _shadowNode = Sprite::createWithTexture(_textSprite->getTexture()); - ((Sprite*)_shadowNode)->setBlendFunc(_blendFunc); + _shadowNode->setBlendFunc(_blendFunc); _shadowNode->setAnchorPoint(Point::ANCHOR_BOTTOM_LEFT); _shadowNode->setColor(_shadowColor); _shadowNode->setOpacity(_effectColorF.a * _displayedOpacity); diff --git a/cocos/2d/CCLabel.h b/cocos/2d/CCLabel.h index 9461d57d67..6f7d2ce6d8 100644 --- a/cocos/2d/CCLabel.h +++ b/cocos/2d/CCLabel.h @@ -372,7 +372,7 @@ protected: int _shadowBlurRadius; kmMat4 _parentTransform; Color3B _shadowColor; - Node* _shadowNode; + Sprite* _shadowNode; Color4B _textColor; Color4F _textColorF;