【发布时间】:2014-03-26 07:13:21
【问题描述】:
以下是我的代码:
Button* buttonLogin = dynamic_cast<Button*>(m_pLayout->getChildByName("login_Button"));
if (buttonLogin)
buttonLogin->addTouchEventListener(this,toucheventselector(GameLoginLayer::touchButton));
当我调试应用程序时,touchButton 函数被调用了两次。有点奇怪。自己的代码中只有一个函数会调用按钮函数。
我查看了 UI 的 cocostudio 原始文件,仅绘制了按钮。
有人有什么建议吗?
谢谢。
【问题讨论】:
标签: c++ ios callback cocos2d-x cocos2d-x-3.0