cocos2d-x-3.2 RichText setAnchorPoint(0,0) 不能对齐到左下角
你们有遇到过吗?
图片里面,红色是用 Label 画出来的,白色是用RichText画出来的
他们的 AnchorPoint和Position都是 一样的
AnchorPoint = (0,0)
Position = (0, winsize.height/2)
cocos2d-x-3.2 RichText setAnchorPoint(0,0) 不能对齐到左下角
你们有遇到过吗?
图片里面,红色是用 Label 画出来的,白色是用RichText画出来的
他们的 AnchorPoint和Position都是 一样的
AnchorPoint = (0,0)
Position = (0, winsize.height/2)
问题已解决: 修改 UIRichText.cpp
— UIRichText.cpp (revision 26)
+++ UIRichText.cpp (working copy)
@@ -458,7 +458,9 @@
this->setContentSize(_customSize);
}
updateContentSizeWithTextureSize(_contentSize);
void RichText::pushToContainer(cocos2d::Node *renderer)
@@ -488,8 +490,9 @@
{
Widget::setAnchorPoint(pt);
_elementRenderersContainer->setAnchorPoint(pt);
const Size& RichText::getVirtualRendererSize() const
{
return _elementRenderersContainer->getContentSize();
楼主威武。