请问cocos2d x 3.3 button的TouchEventType 怎么获得?

cocos2d x 3.3 button的TouchEventType 怎么获得


德玛西亚99
浏览 1235回答 1
1回答

LEATH

void UIButtonTest_Editor::touchEvent(Ref *pSender, Widget::TouchEventType type){switch (type){case Widget::TouchEventType::BEGAN:_displayValueLabel->setString("Touch Down");break;case Widget::TouchEventType::MOVED:_displayValueLabel->setString("Touch Moved");break;case Widget::TouchEventType::ENDED:_displayValueLabel->setString("Touch Ended");break;case Widget::TouchEventType::CANCELED:_displayValueLabel->setString("Touch Canceled");break;default:break;}}
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Cocos2d-x