Author Topic: scroll panel with clipping off doesn't keep items in view  (Read 6369 times)

krubba1

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
scroll panel with clipping off doesn't keep items in view
« on: November 13, 2012, 01:26:59 PM »
Not sure if this is a bug or intentional, but when i have clipping on (soft clip), the scroll panel behaves as expected, i.e. when i drag items passed the edge of screen, they bounce back in. When I turn clipping off, there is no bounce back, and you can effectively drag content completely out of view... And i can keep scrolling it further and further into outer space...

am i missing something?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: scroll panel with clipping off doesn't keep items in view
« Reply #1 on: November 13, 2012, 04:00:18 PM »
No clipping = no boundaries, so no, you are not missing anything.

krubba1

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: scroll panel with clipping off doesn't keep items in view
« Reply #2 on: November 13, 2012, 04:28:06 PM »
Doesn't it seem odd to link scrolling behaviour (not having scroll items fly into space) to clipping behaviour (just a visual effect)?

Can you offer any quick suggestion on how to allow bounds but without the clipping?

krubba1

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: scroll panel with clipping off doesn't keep items in view
« Reply #3 on: November 13, 2012, 04:39:16 PM »
I managed to get bounds respected without clipping, but dislike changing ngui code and risk losing the change on an update. Might I suggest a third clipping mode: "None but with bounds"?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: scroll panel with clipping off doesn't keep items in view
« Reply #4 on: November 13, 2012, 05:19:24 PM »
It seems a bit strange to me to have it done like that, but I'll think about it.

krubba1

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: scroll panel with clipping off doesn't keep items in view
« Reply #5 on: November 13, 2012, 06:20:34 PM »
i agree it feels wrong to piggy back on the clipping functionality, but i'm in a bind and needed to get this working quickly.

But any way to be able to specify bounds so that 'Restrict Within Panel' has an effect with clipping turned off would be nice. Thanks!

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: scroll panel with clipping off doesn't keep items in view
« Reply #6 on: November 14, 2012, 02:46:47 AM »
Why not just clip to full screen?

krubba1

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: scroll panel with clipping off doesn't keep items in view
« Reply #7 on: November 14, 2012, 11:09:36 PM »
Because for some reason on clipping was killing our performance on iOS...

Not sure if that's a known issue, or if we are doing something wrong. But with clipping on we would see 50-100 ms of CPU going to Graphics.PresentAndSync -> Device.Present

Maybe there's something obvious I'm doing wrong to cause such a massive performance hit? Only strangeness is that the scroll list has UITexture items, but otherwise everything is shared on one atlas...

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: scroll panel with clipping off doesn't keep items in view
« Reply #8 on: November 15, 2012, 12:43:03 AM »
Hard clipping = very bad for mobiles. Alpha-based clipping should be better.