Skip to content
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

Creator creates unwanted children to Toggles #178

Open
tankorsmash opened this issue Aug 13, 2018 · 0 comments
Open

Creator creates unwanted children to Toggles #178

tankorsmash opened this issue Aug 13, 2018 · 0 comments

Comments

@tankorsmash
Copy link
Contributor

tankorsmash commented Aug 13, 2018

Creator v1.8.1

If you create a Toggle in Creator and try to use them in cocos2d-x, the background and checkbox sprites are loaded into the ui::CheckBox's instance as textures as expected, but they incorrectly get created as independant nodes inside the CheckBox's children too. That means that using a Toggle has visual weirdness with duplicated sprites and scaling on touch is strange.

The workaround for this is to toggle->removeAllChildren() to clean up the inner background and checkmark sprites, leaving the toggle's protected children untouched.

Unrelated, the parseToggle also sets ignoreContentAdaptWithSize(false), so you can't resize the checkbox in the editor without making that true again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant