Author Topic: Can a sprite be used to clip another sprite?  (Read 1385 times)

jd3d

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Can a sprite be used to clip another sprite?
« on: September 22, 2014, 12:38:13 PM »
I am trying to keep the GUI atlases as small as possible and many of the button elements on a project I am working on uses a rectangular outline shape with a fill color on the inside of it. The background color behind that outline shape changes color to show the different states of the button. I want to use a simple white 4x4 pixel square for that effect with an override color, but the outline shape has an inner and outer curves on the corners so the white square can be seen outside the outline shape. Is there anyway to have that outline shape clip out the square shape?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Can a sprite be used to clip another sprite?
« Reply #1 on: September 23, 2014, 11:05:12 AM »
Yes, NGUI 3.7.3 lets you specify a sprite for clipping on panels. It's always a simple sprite though, not sliced.

jd3d

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: Can a sprite be used to clip another sprite?
« Reply #2 on: October 02, 2014, 08:06:50 PM »
Oh awesome! I'll update and check it out. Thanks!