Author Topic: UITable little bug??  (Read 5936 times)

kenshin

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 24
    • View Profile
UITable little bug??
« on: May 13, 2012, 04:09:31 PM »
Hi,

I have modified the Example 11-Drag&Drop to obtain a vertical panel for drag&drop.
To do this I have just modified "side" parameter of the anchor "Anchor - Bottom", the same for "pivot" parameter of "background" gameobject; after this I have just repositioned graphic elements.
Finally I have changed UITable "columns" parameter from 0 to 1 in "DragDropContainer" gameobject

After this I have noticed that "DragDropContainer" box collider control gizmos has a bad position in unity3d editor, this still happen also if I click "Reposition now" of DragDropContainer.
I am not sure if this produce any type of side effects.

Please, could you check this?

Thanks,
Kenshin

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UITable little bug??
« Reply #1 on: May 13, 2012, 04:12:19 PM »
If you change the size of the widgets parented to a game object with the collider, the collider won't magically update. You need to use the NGUI menu (Add Collider option) re-calculate it. Note that after doing so you will also likely want to bring the collider back a bit so that the draggable items get the events first.

kenshin

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 24
    • View Profile
Re: UITable little bug??
« Reply #2 on: May 14, 2012, 03:10:39 AM »
ArenMook, I am sorry but your suggestion this time doesn't works. :(

I know that in Unity3D things don't change magically, therefore I have changed BoxCollider values manually... with my fingers! ;)
Now, I have update NGUI version (thanks for this update!) and I have tried as you suggest and using "NGUI->Attach a Collider": yes now collider gizmo appear correct but after this D&D doesen't works.

In addition, if I place in a correct position the "DragDropContainer"  BoxCollider, if I click on new "UITable" parameter "Direction" the collider is placed in a wrong place.

Please, just to be sure that don't exist any problem, can you try to convert "Anchor - Bottom" panel into a right anchored drag&drop panel and write here step by step what I must do to obtain this result? (Of course starting from Example 11-Drag&Drop)
In this way we can double check if all gizmos are correctly drawen.

Thanks in advance,
Kenshin

UPDATE:
Just for your information I have tried to add a new vertical-left panel to "Example 11" but starting from the scratch.
I have recreated exactly the structure that you propose for bottom panel, but I still have problems with collider and item position.
Please, check the attatched image.
« Last Edit: May 14, 2012, 03:29:08 AM by kenshin »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UITable little bug??
« Reply #3 on: May 14, 2012, 07:19:51 AM »
I'll do you one better. A video!

I made it left-aligned instead of right-aligned, but it's the same thing.

http://www.tasharen.com/ngui/dragdrop/

kenshin

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 24
    • View Profile
Re: UITable little bug??
« Reply #4 on: May 14, 2012, 11:53:10 AM »
Thanks a lot my friend!

Now I found problem after "Attach a Collider"... editing manually Z center coordinate.

Thanks
Kenshin