mirror of https://github.com/axmolengine/axmol.git
issue #2747: [Best C++ practice] Deprecating Sprite::displayFrame, adding Sprite::getDisplayFrame.
This commit is contained in:
parent
3942c12293
commit
2578d15420
|
@ -2065,7 +2065,7 @@ void Animate::startWithTarget(Node *target)
|
|||
|
||||
if (_animation->getRestoreOriginalFrame())
|
||||
{
|
||||
_origFrame = pSprite->displayFrame();
|
||||
_origFrame = pSprite->getDisplayFrame();
|
||||
_origFrame->retain();
|
||||
}
|
||||
_nextFrame = 0;
|
||||
|
|
|
@ -1004,7 +1004,7 @@ bool Sprite::isFrameDisplayed(SpriteFrame *frame) const
|
|||
frame->getOffset().equals(_unflippedOffsetPositionFromCenter));
|
||||
}
|
||||
|
||||
SpriteFrame* Sprite::displayFrame(void)
|
||||
SpriteFrame* Sprite::getDisplayFrame()
|
||||
{
|
||||
return SpriteFrame::createWithTexture(_texture,
|
||||
CC_RECT_POINTS_TO_PIXELS(_rect),
|
||||
|
@ -1013,7 +1013,7 @@ SpriteFrame* Sprite::displayFrame(void)
|
|||
CC_SIZE_POINTS_TO_PIXELS(_contentSize));
|
||||
}
|
||||
|
||||
SpriteBatchNode* Sprite::getBatchNode(void)
|
||||
SpriteBatchNode* Sprite::getBatchNode()
|
||||
{
|
||||
return _batchNode;
|
||||
}
|
||||
|
|
|
@ -329,10 +329,13 @@ public:
|
|||
*/
|
||||
virtual bool isFrameDisplayed(SpriteFrame *pFrame) const;
|
||||
|
||||
/** @deprecated Use getDisplayFrame() instead */
|
||||
CC_DEPRECATED_ATTRIBUTE virtual SpriteFrame* displayFrame() { return getDisplayFrame(); };
|
||||
|
||||
/**
|
||||
* Returns the current displayed frame.
|
||||
*/
|
||||
virtual SpriteFrame* displayFrame(void);
|
||||
virtual SpriteFrame* getDisplayFrame();
|
||||
|
||||
/// @} End of frames methods
|
||||
|
||||
|
|
Loading…
Reference in New Issue