-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make ListView::setGlobalZOrder() work #17098
Conversation
@zilongshanren please help to review it, thanks. |
if (_buttonDisabledRenderer) | ||
_buttonDisabledRenderer->setGlobalZOrder(globalZOrder); | ||
if (_titleRenderer) | ||
_titleRenderer->setGlobalZOrder(globalZOrder); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh it is not needed since ProtectedNode::setGlobalZOder()
will change the protected children's global z order.
@minggo |
…futurePRs * commit '2dc382bdf0b40892bec06f1fa5b3cdde418b6798': English refinements (cocos2d#17109) Slice9 Sprite with triangles, not quads (cocos2d#17105) Openssl adjust (cocos2d#17106) fix type conversion warnings (cocos2d#17061) fix text input auto correction type (cocos2d#17085) [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#17103) make ListView::setGlobalZOrder() work (cocos2d#17098) update chinese release note implements issue cocos2d#17069 (cocos2d#17090) Fix web engine canvas mode issues (cocos2d#17095) submodules updated: - web - bindings-generator
I believe ui::Widget needs similar treatment to propagate globalZOrder properly. Example, assuming a tree like this: Before this fix: After this fix: This is highly confusing and prevents properly ordering UI elements (both for clipping and for ordering commands). Can you please review this? |
Yeah, this change means that if you add a child to a Layout, and want to have a custom global z order for it, you must wait until after you add the child to the Layout. Not sure what the best approach is though, but it seems like there's a few different concerns that are conflicting with each other. |
No description provided.