Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: kevork on June 17, 2013, 01:32:56 PM
-
If one wanted to have a mask (filled sprite) over another image, where based on where the user touched the mask is set transparent revealing the image underneath (think lotto ticket or fog of war), what would be the best place to start with NGUI?
Thanks!
-
Just one sprite on top of another, change the alpha of the top sprite from 1 to 0?
-
I want the revealed area to represent whatever input the user has recently entered, i.e. the user could remove the top half or the bottom half or make stripes, etc.
-
Create a Texture2D and fill its content dynamically, then use UITexture to draw it on top of another sprite, effectively covering it.
-
Thanks as always ArenMook.
-
Hey, my question is a similar one. I am an artist however and a little new to NGUI. I have a label that I want to be able to partially hide from view, like the fill parameter in sprites. I think this is done with a separate sprite on top of the label that hides only the label text but still shows all other sprites and labels around it.
How do I create a mask-only sprite in ngui and how do i connect it exclusively to one label?
Thanks in advance
-
also, i cannot put this transparent texture in the atlas, thus creating multiple draw orders which i don't want.
-
So... you want to mask out a part of the text, but you want to do it without causing extra draw calls?
The only way to do that is to create a custom label class that will clip the text. I can't be of much help here as this would be highly custom and rather advanced functionality in terms of difficulty.