Strange phenomenon at ui::ScrollView in cocos2d-x 3.15

Hi!
I’m using cocos2d-x 3.15 and I found following strange phenomenon at ui::ScrollView.

I just added following test code to…
‘…/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.cpp’
at line 77.

auto test = Sprite::create(“Images/arrows-hd.png”);
test->setPosition(button->getContentSize() * 0.5);
button->addChild(test);

What I expected was the green arrow to be appeared at the middle of the blue button.
But it wasn’t showed up.

Instead, if I scroll down, the arrow appears at the outside of the clipping area like below:

Is this a bug or is there something I am missing?
Thank you in advance.

I tried exactly same test code to cocos2d-x-3.14.1 and found it’s working as I expected.
I guess this is a bug of cocos2d-x 3.15.

I opened an issue related to this topic:
https://github.com/cocos2d/cocos2d-x/issues/17860

1 Like