Here's how I solved this.
First I watched the latest video which is about Modular User Interface.
http://youtu.be/q1C5NwZasGsI created my background sprite (super useful), a "window" for the container, and some buttons. I added 2 buttons - one to Play/Resume, one to go to another window. I duplicated this window. I called one window Main Menu, the other Options Menu.
Options Button or Main Menu Button - I added UIButton Activate Script twice. First targets Window to deactivate/hide (State not checked). Second targets Window to active/show (State checked).
Play Button - 1 UIButton Activate script. Deactivates the main Panel that all of this is set up on (State not checked).
I looked at the UIButton Activate script, pulled out the necessary components and created the below script which is 100% based on the NGUI script. I created a cube and stuck this script on it.
Hit escape, and the menu opens.
using UnityEngine;
using System.Collections;
//Based on UIButtonActivate NGUI Script
[AddComponentMenu("NGUI/Interaction/Button Activate")]
public class OpenMainMenu : MonoBehaviour {
public GameObject target; //What do we want to activate
public bool state = true; //True will activate, false will deactivate
// Update is called once per frame
void Update () {
if(Input.GetKeyDown(KeyCode.Escape))
{
//If target has not been set, the do nothing
if (target != null) NGUITools.SetActive(target, state);
}
}
}