按钮的点击事件绑定不上~~超级小白~~跪求大神

.h里边是这样的

#ifndef __HELLOWORLD_SCENE_H__
#define __HELLOWORLD_SCENE_H__


#include "cocos2d.h"
//#include "cocos-ext.h"

USING_NS_CC;
using namespace cocos2d::ui;
//USING_NS_CC_EXT;

class HelloWorld : public cocos2d::Layer
{
public:
    // there's no 'id' in cpp, so we recommend returning the class instance pointer
    static cocos2d::Scene* createScene();

    // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
    virtual bool init();
    
    // a selector callback
    void menuCloseCallback(cocos2d::Ref* pSender);

    void touchDown(Ref* pSender, Widget::TouchEventType type);
    
    // implement the "static create()" method manually
    CREATE_FUNC(HelloWorld);

    
};

#endif // __HELLOWORLD_SCENE_H__



```



.cpp里主要那一块是这样的
bool HelloWorld::init()
{
    //////////////////////////////
    // 1. super init first
    if ( !Layer::init() )
    {
        return false;
    }
    
    auto rootNode = CSLoader::createNode("MainScene.csb");

    addChild(rootNode);

    auto panel_title = rootNode->getChildByTag(1);
    
    auto btn_menu = static_cast(rootNode->getChildByTag(2));
    btn_menu->addTouchEventListener(this, SEL_TouchEvent(&HelloWorld::menuCloseCallback));
    return true;
}
void HelloWorld::touchDown(Ref* pSender,Widget::TouchEventType type)
{
    switch (type)
    {
    case ui::Widget::TouchEventType::BEGAN:
        break;
    case ui::Widget::TouchEventType::ENDED:
        break;
    case ui::Widget::TouchEventType::MOVED:
        break;
    default:
        break;
    }
    CCLOG("touch menu");
}


```


然后运行就报这个错
1>c:\workspace\cocos2dx\cocos2dx_workspace\cocos\cocosprojects\smarttvcocos\classes\helloworldscene.cpp(46): error C2511: “void HelloWorld::touchDown(cocos2d::Ref *,cocos2d::ui::Widget::TouchEventType)”:“HelloWorld”中没有找到重载的成员函数
1>          c:\workspace\cocos2dx\cocos2dx_workspace\cocos\cocosprojects\smarttvcocos\classes\helloworldscene.h(12) : 参见“HelloWorld”的声明
我这个应该是声明了吧,在下超级小白,求大神帮助。

运行环境
win8.1+64位+vs2013+cocos2d-x 3.3RC0 + cocosStudio 2.0

擦加了代码怎么变成这德行了~
重新发一下.c是这样的
#ifndef HELLOWORLD_SCENE_H
#define HELLOWORLD_SCENE_H

#include “cocos2d.h”
//#include “cocos-ext.h”

USING_NS_CC;
using namespace cocos2d::ui;
//USING_NS_CC_EXT;

class HelloWorld : public cocos2d::Layer
{
public:
// there’s no ‘id’ in cpp, so we recommend returning the class instance pointer
static cocos2d::Scene* createScene();

// Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
virtual bool init();

// a selector callback
void menuCloseCallback(cocos2d::Ref* pSender);

void touchDown(Ref* pSender, Widget::TouchEventType type);

// implement the "static create()" method manually
CREATE_FUNC(HelloWorld);

};

#endif // HELLOWORLD_SCENE_H

.cpp关键部分是这样的
bool HelloWorld::init()
{
//////////////////////////////
// 1. super init first
if ( !Layer::init() )
{
return false;
}

auto rootNode = CSLoader::createNode("MainScene.csb");

addChild(rootNode);

auto panel_title = rootNode->getChildByTag(1);

auto btn_menu = static_cast<ui::Button*>(rootNode->getChildByTag(2));
btn_menu->addTouchEventListener(this, SEL_TouchEvent(&HelloWorld::menuCloseCallback));
return true;

}
void HelloWorld::touchDown(Ref* pSender,Widget::TouchEventType type)
{
switch (type)
{
case ui::Widget::TouchEventType::BEGAN:
break;
case ui::Widget::TouchEventType::ENDED:
break;
case ui::Widget::TouchEventType::MOVED:
break;
default:
break;
}
CCLOG(“touch menu”);
}

TouchEventType有问题
addTouchEventListener(this, SEL_TouchEvent(&HelloWorld::menuCloseCallback));
这里menuCloseCallback里面的应该声明为 ui::TouchEventType,而不是Widget::TouchEventType

上面这个addTouchEventListener被声明为废弃的,应该使用下面这种

addTouchEventListener(CC_CALLBACK_2(HelloWorld::menuCloseCallback,this));
这样下面的menuCloseCallback就不用改了

用上面哪个的话,
case ui::Widget::TouchEventType::BEGAN:
break;
case ui::Widget::TouchEventType::ENDED:
break;
case ui::Widget::TouchEventType::MOVED:
break;
这里的枚举值都要小换一下

你可以去看下addTouchEventListener这个函数的声明