Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: danfoo on November 25, 2013, 09:48:57 AM

Title: Duplicating toggle and moving to another panel = confusion
Post by: danfoo on November 25, 2013, 09:48:57 AM
If I do the following:
- Create a panel ("panel1")
- Create a Toggle under panel1
- Create a second panel ("panel2")
- Duplicate Toggle and move from panel1 to panel2

Result:
Selecting the moved toggle will have the checkmark sprite incorrectly placed with an offset relative to panel1. Creating an entirely new Toggle on panel2 will not result in this behavior.

Any ideas? Obvious workaround is to create the controls from scratch for each panel, but this should not be necessary?
Title: Re: Duplicating toggle and moving to another panel = confusion
Post by: ArenMook on November 25, 2013, 07:29:02 PM
I'm not quite sure I follow the repro steps. There are no issues if I drag & drop "Control - Simple Checkbox" into the scene, create a new panel, duplicate the original checkbox and move it to the second panel.
Title: Re: Duplicating toggle and moving to another panel = confusion
Post by: danfoo on November 26, 2013, 08:30:16 AM
I'm not quite sure I follow the repro steps. There are no issues if I drag & drop "Control - Simple Checkbox" into the scene, create a new panel, duplicate the original checkbox and move it to the second panel.

I created the Toggle using the widget wizard. When duplicating the Toggle and moving it to another panel it seems to have some link or reference to the old checkbox sprite positioning. Instead of positioning the checkbox sprite relative to the current location of the Toggle it appears where it would have been on the old panel.
I worked around it by recreating the widget directly on the old panel, but there does seem to be a bug there somewhere....
Title: Re: Duplicating toggle and moving to another panel = confusion
Post by: ArenMook on November 26, 2013, 08:32:54 AM
I don't recommend using the widget wizard anymore. There are prefabs you can just drag & drop into your scene, and you can make your own controls into prefabs the same way.