mirror of https://github.com/axmolengine/axmol.git
issue #2404: Reverting callback interface for CCBReader.
This commit is contained in:
parent
e5c2ad0cb8
commit
00999b464e
|
@ -617,7 +617,7 @@ Object* CCBAnimationManager::actionForCallbackChannel(CCBSequenceProperty* chann
|
|||
CCBSelectorResolver* targetAsCCBSelectorResolver = dynamic_cast<CCBSelectorResolver *>(target);
|
||||
|
||||
if(targetAsCCBSelectorResolver != NULL) {
|
||||
selCallFunc = targetAsCCBSelectorResolver->onResolveCCBCallFuncSelector(target, selectorName.c_str ());
|
||||
selCallFunc = targetAsCCBSelectorResolver->onResolveCCBCCCallFuncSelector(target, selectorName.c_str ());
|
||||
}
|
||||
if(selCallFunc == 0) {
|
||||
CCLOG("Skipping selector '%s' since no CCBSelectorResolver is present.", selectorName.c_str());
|
||||
|
|
|
@ -23,9 +23,9 @@ NS_CC_EXT_BEGIN
|
|||
class CCBSelectorResolver {
|
||||
public:
|
||||
virtual ~CCBSelectorResolver() {};
|
||||
virtual SEL_MenuHandler onResolveCCBMenuItemSelector(Object * pTarget, const char* pSelectorName) = 0;
|
||||
virtual SEL_CallFuncN onResolveCCBCallFuncSelector(Object * pTarget, const char* pSelectorName) { return NULL; };
|
||||
virtual SEL_CCControlHandler onResolveCCBControlSelector(Object * pTarget, const char* pSelectorName) = 0;
|
||||
virtual SEL_MenuHandler onResolveCCBCCMenuItemSelector(Object * pTarget, const char* pSelectorName) = 0;
|
||||
virtual SEL_CallFuncN onResolveCCBCCCallFuncSelector(Object * pTarget, const char* pSelectorName) { return NULL; };
|
||||
virtual SEL_CCControlHandler onResolveCCBCCControlSelector(Object * pTarget, const char* pSelectorName) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -754,12 +754,12 @@ BlockData * NodeLoader::parsePropTypeBlock(Node * pNode, Node * pParent, CCBRead
|
|||
CCBSelectorResolver * targetAsCCBSelectorResolver = dynamic_cast<CCBSelectorResolver *>(target);
|
||||
|
||||
if(targetAsCCBSelectorResolver != NULL) {
|
||||
selMenuHandler = targetAsCCBSelectorResolver->onResolveCCBMenuItemSelector(target, selectorName.c_str());
|
||||
selMenuHandler = targetAsCCBSelectorResolver->onResolveCCBCCMenuItemSelector(target, selectorName.c_str());
|
||||
}
|
||||
if(selMenuHandler == 0) {
|
||||
CCBSelectorResolver * ccbSelectorResolver = pCCBReader->getCCBSelectorResolver();
|
||||
if(ccbSelectorResolver != NULL) {
|
||||
selMenuHandler = ccbSelectorResolver->onResolveCCBMenuItemSelector(target, selectorName.c_str());
|
||||
selMenuHandler = ccbSelectorResolver->onResolveCCBCCMenuItemSelector(target, selectorName.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -816,12 +816,12 @@ BlockControlData * NodeLoader::parsePropTypeBlockControl(Node * pNode, Node * pP
|
|||
CCBSelectorResolver * targetAsCCBSelectorResolver = dynamic_cast<CCBSelectorResolver *>(target);
|
||||
|
||||
if(targetAsCCBSelectorResolver != NULL) {
|
||||
selControlHandler = targetAsCCBSelectorResolver->onResolveCCBControlSelector(target, selectorName.c_str());
|
||||
selControlHandler = targetAsCCBSelectorResolver->onResolveCCBCCControlSelector(target, selectorName.c_str());
|
||||
}
|
||||
if(selControlHandler == 0) {
|
||||
CCBSelectorResolver * ccbSelectorResolver = pCCBReader->getCCBSelectorResolver();
|
||||
if(ccbSelectorResolver != NULL) {
|
||||
selControlHandler = ccbSelectorResolver->onResolveCCBControlSelector(target, selectorName.c_str());
|
||||
selControlHandler = ccbSelectorResolver->onResolveCCBCCControlSelector(target, selectorName.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue