Author Topic: Nested clipping  (Read 3305 times)

tgraupmann

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 15
    • View Profile
Nested clipping
« on: January 03, 2013, 01:49:32 PM »
Apparently NGUI supports setting a clip boundary on the UIPanel.

But if you set a clip boundary on a nested UIPanel, the boundary is ignored.

Would it be psssible to add support for nested clipping by nesting UIPanels?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Nested clipping
« Reply #1 on: January 03, 2013, 06:15:03 PM »
Sorry, no. You can only specify one matrix for the shader.

BlackHornet

  • Guest
Re: Nested clipping
« Reply #2 on: May 05, 2013, 08:06:57 AM »
Sry to bring it back, but maybe this could be possible somehow, even with additional draw passes?

Actually I want to create a dragging panel of some items, where the description of each item should be a scrolling text (like a TextArea)...in a previous comment by you ArenMook you suggested to use a Label within a Clipping Panel to have "smooth" scrolling the text.
So i thought about the nested clipping in that case, but actually the result isn't feasible, as the "inner clipping panel" isn't clipped by the "outer clipping panel" and the complete scrolltext is printed out of my items dragging panel.

There are some tricky "collider" usages too, but if anybody has an idea to deal with the case above, I'd be really glad to know :)

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Nested clipping
« Reply #3 on: May 05, 2013, 05:22:02 PM »
It's "just" a matter of having the panels below the main clippingpanel match their cliprange to the main cliprange. It can be heavy depending on how many sub-panels you want, but it's not impossible.

It's a pretty custom thing though, so I doubt it will make it into the mainline of NGUI.

I've messed around with it - if I find some time to do it, I'll make a little tutorial about it.