Author Topic: interaction menu  (Read 2633 times)

mrscruff

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
interaction menu
« on: July 18, 2014, 06:14:26 PM »
Guys, Im really stuck since 2 days on my project,

I havent find documentation to do my menu,

I want to click on a button ( he is in a scrollview and grid ) , then new buttons appear at the same place, then when I click on a button, others button disapear and appear when I click a second time,

Can you explain me how to do this please ?

I joined a beautiful drawing ( black button is a return button )

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: interaction menu
« Reply #1 on: July 19, 2014, 12:32:54 PM »
Easiest way? Have more than one scroll view. When you click on a button, you will basically hide one scroll view and show another. The second scroll view will have the buttons you need in there. When you click on something in that 2nd scroll view, you will hide the 2nd scroll view and show the first one again.

mrscruff

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: interaction menu
« Reply #2 on: July 21, 2014, 12:35:58 PM »
thx for your help,

cause I was trying to load different scene when I click on the button, its not really efficient practical,

but Im not able to find this option 'hide something when I click on' in NGUI script,

I have to create this function ? or she is already exist on a script ?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: interaction menu
« Reply #3 on: July 21, 2014, 06:29:56 PM »
  1. using UnityEngine;
  2.  
  3. public class HideSomething : MonoBehaviour
  4. {
  5.     public GameObject whatToHide;
  6.  
  7.     void OnClick () { whatToHide.activeSelf = false; }
  8. }