Cocos2d-x3.3Final(9)RichText常用成员函数(C++)

Cocos2d-x3.3Final(9)RichText常用成员函数(C++),第1张

概述RichText  * _richText = RichText::create(); RichElementText * re1 = RichElementText::create(1, Color3B::RED, 255, str1, "Marker Felt", 10); RichElementText * re4 = RIchElementText::create(4, Color3B::

RichText * _richText = RichText::create();

RichElementText * re1 = RichElementText::create(1,color3B::RED,255,str1,"Marker Felt",10);

RichElementText * re4 = RIchElementText::create(4,color3B::GREEN,"And green with TTF support. ","Fonts/Marker Felt.ttf",10);

RichElementimage * reimg = RichElementimage::create(6,color3B::WHITE,"slIDerballnormal.png");


cocostudio::ArmatureDataManager::getInstance()->addArmaturefileInfo("100/100.ExportJson");

cocostudio::Armature * pAr = cocostudio::Armature::create("100");

pAr->getAnimation()->play("Animation1"); //创建骨骼动画


RichElementCustomNode * recustom = RichElementCustomNode::create(1,color::WHITE,pAr); //构造富文本元素


_richText->pushBackElement(re1);

_richText->insertElement(re2,1);

_richText->insertElement(reimg,2);

_richText->pushBackElement(recustom);


_richText->setLocalZOrder(10);

addChild(_richText);


_richText->ignoreContentAdaptWithSize(true); //是否忽略当前内容适应大小,为true则 不管_richText的大小,按照默认的渲染器的大小进行渲染。

总结

以上是内存溢出为你收集整理的Cocos2d-x3.3Final(9)RichText常用成员函数(C++)全部内容,希望文章能够帮你解决Cocos2d-x3.3Final(9)RichText常用成员函数(C++)所遇到的程序开发问题。

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

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

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

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

发表评论

登录后才能评论

评论列表(0条)

保存