Author Topic: Menu integration  (Read 1687 times)

andysaunders

  • Guest
Menu integration
« on: April 01, 2013, 03:47:36 PM »
I've looked at all the menu examples which are really useful, but they don't show how to integrate them in to a project, enable and disable panels etc

Are there any tutorial on this? As I can't find any.

Any help would be appreciated

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: Menu integration
« Reply #1 on: April 02, 2013, 12:43:03 PM »

For show/hide panels I'm using something similar to this:

  1. public GameObject ShowPanel;
  2. public GameObject HidePanel;
  3.  
  4.  
  5. void OnClick()
  6. {
  7.   NGUITools.SetActive(ShowPanel, true)
  8.   NGUITools.SetActive(HidePanel, false)
  9. }

This should go in the button, and when you press it, it would hide one panel and show another one.

I'm not sure it's the better way, but at least it works.




andysaunders

  • Guest
Re: Menu integration
« Reply #2 on: April 02, 2013, 02:01:19 PM »
Thats perfect, thank you
Andy