如何在Cocos2dx中修改加载CocoStudio的TextField内容
1个回答
推荐于2016-04-04
展开全部
m_pUILayer = Layer::create();
m_pUILayer->scheduleUpdate();
addChild(m_pUILayer);
// register root from json
m_pLayout = dynamic_cast<Layout*>(cocostudio::GUIReader::getInstance()->widgetFromJsonFile("DemoLogin\\DemoLogin.ExportJson"));
m_pUILayer->addChild(m_pLayout);
_displayValueLabel = static_cast<Text*>(Helper::seekWidgetByName(m_pLayout, "name_TextField"));
_displayValueLabel->setText("te");
试试
m_pUILayer->scheduleUpdate();
addChild(m_pUILayer);
// register root from json
m_pLayout = dynamic_cast<Layout*>(cocostudio::GUIReader::getInstance()->widgetFromJsonFile("DemoLogin\\DemoLogin.ExportJson"));
m_pUILayer->addChild(m_pLayout);
_displayValueLabel = static_cast<Text*>(Helper::seekWidgetByName(m_pLayout, "name_TextField"));
_displayValueLabel->setText("te");
试试
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询