Author Topic: Duplicating toggle and moving to another panel = confusion  (Read 4450 times)

danfoo

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 93
    • View Profile
Duplicating toggle and moving to another panel = confusion
« 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?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Duplicating toggle and moving to another panel = confusion
« Reply #1 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.

danfoo

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 93
    • View Profile
Re: Duplicating toggle and moving to another panel = confusion
« Reply #2 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....

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Duplicating toggle and moving to another panel = confusion
« Reply #3 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.