Cocos2d-x_CCControlSlider(滑动条类)介绍

Cocos2d-x_CCControlSlider(滑动条类)介绍,第1张

概述bool HelloWorld::init(){ if ( !CCLayer::init() ) { return false; } CCSize winSize = CCDirector::sharedDirector()->getWinSize(); CCControlSlider *slider = CCCont
bool HelloWorld::init(){    if ( !cclayer::init() )    {        return false;    }        CCSize winSize = CCDirector::sharedDirector()->getWinSize();        CCControlSlIDer *slIDer = CCControlSlIDer::create("slIDerBg.png","slIDerProgress.png","slIDerThumb.png");    slIDer->setMaximumAllowedValue(100);    slIDer->setMinimumAllowedValue(0);    slIDer->setposition(ccp(200,170));    slIDer->addTargetWithActionForControlEvents(this,cccontrol_selector(HelloWorld::valueChange),CCControlEventValueChanged);    this->addChild(slIDer);        return true;}voID HelloWorld::valueChange(CCObject *pSender){    CCControlSlIDer *slIDer = (CCControlSlIDer *)pSender;    float value = slIDer->getValue();        cclog("value:%.2f",value);}
总结

以上是内存溢出为你收集整理的Cocos2d-x_CCControlSlider(滑动条类)介绍全部内容,希望文章能够帮你解决Cocos2d-x_CCControlSlider(滑动条类)介绍所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1004635.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-22
下一篇 2022-05-22

发表评论

登录后才能评论

评论列表(0条)

保存