mirror of https://github.com/axmolengine/axmol.git
commit
33e85bdc53
|
@ -74,6 +74,9 @@ namespace cocos2d{
|
||||||
* If pszFunctionName is NULL, then unregister it.
|
* If pszFunctionName is NULL, then unregister it.
|
||||||
*/
|
*/
|
||||||
virtual void registerScriptHandler(const char* pszFunctionName);
|
virtual void registerScriptHandler(const char* pszFunctionName);
|
||||||
|
|
||||||
|
/** set the target/selector of the menu item*/
|
||||||
|
void setTarget(SelectorProtocol *rec, SEL_MenuHandler selector);
|
||||||
protected:
|
protected:
|
||||||
SelectorProtocol* m_pListener;
|
SelectorProtocol* m_pListener;
|
||||||
SEL_MenuHandler m_pfnSelector;
|
SEL_MenuHandler m_pfnSelector;
|
||||||
|
|
|
@ -123,6 +123,12 @@ namespace cocos2d{
|
||||||
return m_bIsSelected;
|
return m_bIsSelected;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CCMenuItem::setTarget(SelectorProtocol *rec, SEL_MenuHandler selector)
|
||||||
|
{
|
||||||
|
m_pListener = rec;
|
||||||
|
m_pfnSelector = selector;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
//CCMenuItemLabel
|
//CCMenuItemLabel
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue