Author Topic: Problem with UIDraggablePanel  (Read 6625 times)

primus88

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 50
    • View Profile
Problem with UIDraggablePanel
« on: March 15, 2014, 07:09:33 PM »
Hello.

I implemented a UIDraggablePanel in my GUI, but it does not behave correctly.



1. First thing to notice in the attached gif, is that the first label is not at the top of the panel, but at the middle.
2. then when i scroll, if I move the mouse pointer over the bottom label, the label just springs up to the top.
3. finally, when attempting again to drag, the window of the draggable panel shows all the labels in the correct position and they behave as intended.

How can I fix these issues and/or what should I check to see if I did wrong?

Thank you in advance,
Primus

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem with UIDraggablePanel
« Reply #1 on: March 15, 2014, 10:57:23 PM »
Is the slider inside your scroll view? It needs to be outside.

primus88

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 50
    • View Profile
Re: Problem with UIDraggablePanel
« Reply #2 on: March 16, 2014, 03:18:52 AM »
NO it isn't.
Also it is a Scroll Bar (does this matter?)

They are organised like this:


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem with UIDraggablePanel
« Reply #3 on: March 16, 2014, 12:16:55 PM »
What's "DefaultTab"? When you only see one label there, where are all the others located? If you select them in scene view, what do you see? Do you see the box outlines? Do they exist at edit time or do you add them at run-time? If you add them at run-time, how are you doing it?

primus88

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 50
    • View Profile
Re: Problem with UIDraggablePanel
« Reply #4 on: March 16, 2014, 02:40:26 PM »
Default tab, is just another element from the grid.
The labels exist in editor, but they are activated / deactivated (NGUITools.SetActive) based on the saved information that the respective journal entry was unlocked or not.
So when the game starts, there will be only the Default Tab, as it is the basic journal entry.

When I select each, I see about the same thing as in the picture I gave, only that it's highlighted. This is in edit mode, as in play mode i don't see anything when it is disabled.
I made a detailed video on how it behaves. On the left is in the editor and on the right it's in the actual play mode.

https://www.youtube.com/watch?v=WSB3mGAYON4&feature=youtu.be

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem with UIDraggablePanel
« Reply #5 on: March 17, 2014, 01:26:03 AM »
I am in SF right now and hotel wifi down here is notoriously slow, so youtube videos are a no-go until I return on Thursday night.

primus88

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 50
    • View Profile
Re: Problem with UIDraggablePanel
« Reply #6 on: March 17, 2014, 01:21:10 PM »
I understand, but from the info until now, there is nothing to do next?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem with UIDraggablePanel
« Reply #7 on: March 18, 2014, 09:32:06 PM »
Without looking at the project and being away from my code I wouldn't be able to tell you what's happening on your end. You can try posting your scene for others to look at, just please don't include NGUI's source code.