Boolean group in cocos creator

Boolean group in cocos creator
0

Like in html there are checkbox groups and radio button groups. Where only one checkbox/radio button is allowed to select. Is there any way to do it in cocos creator.
on add @property in script as boolean, its shown as a checkbox. So is there a way to create a boolean group.

If you’re talking about doing a checkbox group on the inspector as properties, you can do it by listening to the property with the ‘notify’ attribute.
It only works on JS I think.
You can listen when one of the bolean is checked and then uncheck the other ones.

https://docs.cocos2d-x.org/creator/manual/en/scripting/reference/attributes.html

Oh, thanks

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.