How to split screen or have variable layer size

BTW, I think cocos2d::ui::ScrollView is a derived class from Layout, so maybe you can directly create an ScrollView instead of a Layout for your upper screen part. As a subclass of Layout, it should have the clipping feature too.

it does. I use Scrollview extensively in a calendaring app I was writing.

I did a few experiments. I had to change the clipping type from Stencil to Scissors, and it’s working just like I wanted. I will run a few more tests and update here. I think this is the best solution. Thanks bro!! :smiley:

1 Like

One thing that I noticed so far is that, the thing works as we require, but no matter how you move/scroll, there is a tearing effect at the topmost area… The sprites get cut in triangle meshes and you can easily spot them.

Never heard of that! Can you post a screenshot? Maybe that has something to do with the “Scissors” clipping type…?