Cocostudio常用控件
来源:互联网 发布:博主一半开了淘宝店 编辑:程序博客网 时间:2024/05/16 17:35
<1>UILayer_uiLayer = UILayer::create();<2>UILayoutUIPanel *tLayer = dynamic_cast<UIPanel*>(GUIReader::shareReader()->widgetFromBinaryFile("scene/Main.csb"));_uiLayer->addWidget(tLayer);addChild(_uiLayer);<3>UIPanel_cellRoom = dynamic_cast<UIPanel*>(tLayer->getChildByName("cellRoom"));_cellRoom->setEnabled(false);<4>UIImageViewUIImageView *imgLayer = dynamic_cast<UIImageView*>(tLayer->getChildByName("imgMoney"));imgLayer->addTouchEventListener(this, toucheventselector(MainLayer::clickGoMyInfo));void MainLayer::clickGoMyInfo(cocos2d::CCObject *pSender, cocos2d::ui::TouchEventType type){ if(type!=TOUCH_EVENT_ENDED)return; CCScene *pScene = MyInfoLayer::scene(0); CCDirector::sharedDirector()->replaceScene(pScene);}<5>UIButtonUIButton *btn = dynamic_cast<UIButton*>(tLayer->getChildByName("btnBack"));btn->addTouchEventListener(this, toucheventselector(MainLayer::clickBack));<6>UIListViewUIImageView *imgBg = dynamic_cast<UIImageView*>(tlayer->getChildByName("imgBg"));_listViewSignDay = dynamic_cast<UIListView*>(imgBg->getChildByName("listViewDay"));<7>UILabel_labelName = dynamic_cast<UILabel*>(imgLayer->getChildByName("Name"));<8>UILabelBMFontUIButton *btn = dynamic_cast<UIButton*>(imgBg->getChildByName("btnBack"));UILabelBMFont *lbm = dynamic_cast<UILabelBMFont*>(btn->getChildByName("BitmapLabel"));lbm->setText("放弃离开");<9>UIPageView_pageRoom = dynamic_cast<UIPageView*>(tLayer->getChildByName("listRoom"));_pageRoom->addEventListenerPageView(this, pagevieweventselector(MainLayer::pageViewEventRoom));void MainLayer::pageViewEventRoom(CCObject *pSender, PageViewEventType type){ if(type != PAGEVIEW_EVENT_TURNING)return; UIPageView* pageView = dynamic_cast<UIPageView*>(pSender); short cur = pageView->getCurPageIndex(); short count = pageView->getPages()->count(); _btnLeft->setEnabled(cur>0); _btnRight->setEnabled(count>1&&cur<count-1);}<10>UILabelAtlas_labelLv = dynamic_cast<UILabelAtlas*>(_imgLv->getChildByName("AtlasLabel"));_labelLv->setIntervalW(-4);
0 0
- Cocostudio常用控件
- Cocostudio控件
- CocoStudio中的一些控件
- cocos2dx & cocostudio 控件构想
- cocoStudio:ScrollView控件使用记录
- CocoStudio:多个控件对齐
- CocoStudio
- CocoStudio
- cocostudio
- 【cocosStudio】查看官方示例--调用cocoStudio控件
- cocoStudio:ScrollView控件使用记录(2)
- CocoStudio: UI控件的基类Widget
- cocostudio中的一些控件的使用
- 【cocosStudio】查看官方示例--调用cocoStudio控件
- Cocos2dx:cocostudio 2.0 Text文本控件
- 【cocosStudio】查看官方示例--调用cocoStudio控件
- CocoStudio UIButton setPressedActionEnabled 子控件缩放解决方案
- Cocos2d-x教程 CocoStudio篇 (2) UIButton控件
- redis安装配置
- 获取当前登录windows的帐号
- rtsp协议标准流程
- Java中throw和throws的区别
- 期望窗口
- Cocostudio常用控件
- Android 简单的单元测试用例
- 解决java.util.concurrent.RejectedExecutionException
- Search insert position
- android 截图
- B2B,B2C,C2C,C2B,B2G 之间的区别
- 播放声音文件 PlaySound函数应用
- 主要变例搜索
- NSTimer的坑