Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: sk1989 on July 24, 2012, 01:21:52 PM

Title: How to use UIWIDGET on buttons
Post by: sk1989 on July 24, 2012, 01:21:52 PM
In terms of code wise, how can I use the UIWIDGET for my buttons. I want to change the depth and alpha values of my UIBUTTON and UILABEL.

Title: Re: How to use UIWIDGET on buttons
Post by: PhilipC on July 24, 2012, 01:36:03 PM
Only UITextures, UISprites, and UILabels are concidered UIWidgets (they are the only ones that derive from the widget). Buttons are just a combination of sprites and labels with controls on them (scripts that make them behave a certain way). If you need to change the depth via code you will need to find in children all components of type UIWidget and then do a .depth on each of them (same goes for the color).
Title: Re: How to use UIWIDGET on buttons
Post by: sk1989 on July 24, 2012, 07:20:15 PM
Oh okay that makes sense. thanks