Add setKeypadEnabled and isKeypadEnabled deprecated functions

This commit is contained in:
samuele3hu 2013-09-18 14:49:19 +08:00
parent be3510cb74
commit 64c5e183ce
1 changed files with 19 additions and 0 deletions

View File

@ -117,6 +117,11 @@ function CCMenuDeprecated.createWithItem(self,...)
return self:create(...) return self:create(...)
end end
rawset(CCMenu,"createWithItem",CCMenuDeprecated.createWithItem) rawset(CCMenu,"createWithItem",CCMenuDeprecated.createWithItem)
function CCMenuDeprecated.setHandlerPriority(self)
print("\n********** \n".."setHandlerPriority was deprecated in 3.0. \n**********")
end
rawset(CCMenu,"setHandlerPriority",CCMenuDeprecated.setHandlerPriority)
--functions of CCMenu will be deprecated end --functions of CCMenu will be deprecated end
--functions of CCNode will be deprecated begin --functions of CCNode will be deprecated begin
@ -1015,3 +1020,17 @@ function CCSpriteDeprecated.setFlipY(self,flag)
end end
rawset(cc.Sprite, "setFlipY", CCSpriteDeprecated.setFlipY) rawset(cc.Sprite, "setFlipY", CCSpriteDeprecated.setFlipY)
--functions of Sprite will be deprecated end --functions of Sprite will be deprecated end
--functions of Layer will be deprecated begin
local CCLayerDeprecated = {}
function CCLayerDeprecated.setKeypadEnabled( self, enabled)
return self:setKeyboardEnabled(enabled)
end
rawset(cc.Layer, "setKeypadEnabled", CCLayerDeprecated.setKeypadEnabled )
function CCLayerDeprecated.isKeypadEnabled(self)
return self:isKeyboardEnabled()
end
rawset(cc.Layer, "isKeypadEnabled", CCLayerDeprecated.isKeypadEnabled )
--functions of Layer will be deprecated end