Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: albertofog on October 14, 2013, 05:59:41 AM

Title: Clipped panel with particular shape?
Post by: albertofog on October 14, 2013, 05:59:41 AM
I'm developing a little match-3 game à la Candy Crush, and I'm wondering if it's possible to make a clipped panel that is not a squared/rectangular shape.
I've been looking around the code of the UIPanel script but I can't see anything that could help me achieve it... I use NGUI 2.6.4.
Some examples:
Quote
(http://www.tuexperto.com/wp-content/uploads/2013/03/candy-crush-facebook-02.jpg)

(http://www.pocketgamer.co.uk/artwork/na-tyoo/candy-crush-saga-ios-3.jpg) (http://graphics8.nytimes.com/images/2013/07/02/technology/02bits-candycrush1/02bits-candycrush1-hpMedium.png)

(http://www.crushingcandies.com/wp-content/uploads/2013/02/candycrushlevel70.png)

Does anyone have any ideas?
Title: Re: Clipped panel with particular shape?
Post by: ArenMook on October 14, 2013, 09:49:41 AM
You can use depth marks. Draw an invisible widget on top of the UI in the shape that you want first, and when UI will draw it will get "clipped" by the depth.
Title: Re: Clipped panel with particular shape?
Post by: albertofog on October 15, 2013, 03:48:56 AM
You can use depth marks. Draw an invisible widget on top of the UI in the shape that you want first, and when UI will draw it will get "clipped" by the depth.

Depth marks?
Hmmm, not entirely sure how to do those :/
When you mean "invisible widget", do you mean a inactive GameObject? Or what do you mean?

I would appreciate some more enlightening on this... thanks in advance!