You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: