Author Topic: Scrolls, Panels, depth, visibility problems  (Read 15362 times)

libero

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Scrolls, Panels, depth, visibility problems
« on: September 29, 2015, 09:31:37 AM »
Hello, i have a question about panels and their depths. So i have a window, which basically has 2 panels and three scroll views. They all have different depth started from 4 (basement of window) to 8. In this window after clicking on button two scroll views should move from clipped area to visibility. So i created empty widget, put them in it and add TweenPosition.

Unfortunately, when i click on button and my widget moves to its position, i can't see anything in two of that scroll views. But, if i turn them off in inspector, and then turn them back on, they appears.
I suppose i missed something. All panels has Renderq set on automatic.

In attachment i draw some picture of my issue. ScrollViews 2 and 3 disappear.
By empty widget i mean invisible widget
« Last Edit: September 30, 2015, 03:49:44 PM by libero »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Scrolls, Panels, depth, visibility problems
« Reply #1 on: September 29, 2015, 04:36:23 PM »
If you changed the parent of a widget, you need to tell it you've done so: NGUITools.MarkParentAsChanged(...)

libero

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Scrolls, Panels, depth, visibility problems
« Reply #2 on: September 30, 2015, 10:41:38 AM »
But i didn't change parents of widgets. All scroll views widgets are children to one panel (panel depth 5 on picture) and this situation doesn't change. They only move from culled area to the center via tweenposition. And usual sprites looks just ok, but everything inside scrollviews doesn't show up, until i do something with them in inspector

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Scrolls, Panels, depth, visibility problems
« Reply #3 on: October 01, 2015, 02:14:56 AM »
Just to see if I understand you correctly... you have a scroll view, and you are moving the content inside to somewhere outside the bounds of the scroll view's rectangle, and it (predictably) doesn't show up -- as it should be. You want it to show up? Put it on a different panel first that's not clipped.

P.S. Make sure you have NGUI 3.9.3 as I fixed something related to panels not detecting transform changes properly.

angelxv

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Scrolls, Panels, depth, visibility problems
« Reply #4 on: November 22, 2016, 12:05:11 AM »
is there any suggestion that we can solve this problem on 3.7.5? we can not upgrade ngui because deadline is this week...

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Scrolls, Panels, depth, visibility problems
« Reply #5 on: November 27, 2016, 04:04:40 PM »
There's not much I can suggest. You're asking about one change out of hundreds that happened over a year ago. I can only suggest taking the latest NGUI and doing a diff with your version.