Author Topic: NGUI texture  (Read 2876 times)

stanish

  • Guest
NGUI texture
« on: September 04, 2012, 04:31:34 AM »
please go this link- http://www.tasharen.com/ngui/example8.html.in this menu there is option button when i press option button it goes to Option menu, can u explain through script how it has done in NGUI.

stanish

  • Guest
Re: NGUI texture
« Reply #1 on: September 04, 2012, 06:03:28 AM »
anyone help through code..

dlewis

  • Guest
Re: NGUI texture
« Reply #2 on: September 04, 2012, 06:53:02 AM »
Have you tried opening the example in Unity (examples are provided) and seeing what scripts are attached and looking at their code?

stanish

  • Guest
Re: NGUI texture
« Reply #3 on: September 04, 2012, 06:54:53 AM »
i m not gettin your point.

dlewis

  • Guest
Re: NGUI texture
« Reply #4 on: September 04, 2012, 06:56:45 AM »
Example8 is include in NGUI. If you want to know more about how things work in the example you first thing you should do it load up the scene titled Example8 (When you buy NGUI all of the example scenes are included). Once you have the scene open you can look at all of the objects in the scene and see what scripts are attached to them.

stanish

  • Guest
Re: NGUI texture
« Reply #5 on: September 04, 2012, 07:02:00 AM »
k,but i want to know how when i click any button we can call other texture ,i need litl bit help in code..

PhilipC

  • Guest
Re: NGUI texture
« Reply #6 on: September 04, 2012, 08:41:20 AM »
The options panel that you see being brought in is a different panel that is disabled when the application starts. The button "Options" then has a UIButtonPlayAnimation when when "onCLick" is called will bring in that panel. At the same time when the button is clicked it dismisses the first panel. Take a look at Example 3 in the NGUI examples and look at the Gameobject "Button - Options"
« Last Edit: September 04, 2012, 04:08:20 PM by PhilipC »

stanish

  • Guest
Re: NGUI texture
« Reply #7 on: September 05, 2012, 12:43:10 AM »
Hey no one in this forum help me through code .I had stuck,plz help through code.......

PhilipC

  • Guest
Re: NGUI texture
« Reply #8 on: September 05, 2012, 08:47:00 AM »
That example you want to mimic requires no new code its possible to do it with scripts that come with NGUI. UIButtonPlayAnimation for example listens for the click event and then plays the animation that is required.

If you want to just listen for when something is clicked put a "public void OnClick()" function in to any class that is attached to this button gameObject.