Cocos2dx 获取button控件并监听


//-按钮回调函数的监听事件-

Button* pButton->addTouchEventListener(CC_CALLBACK_2(_类名_ :: _回调函数名_,this));

//-回调函数的实现-

void GameCoin::ButtonType( Ref* pSender,Widget :: TouchEventType type )

{

}